---------------------------------------------------------------------------------
      name:  <unnamed>
       log:  /Users/stanig/Library/CloudStorage/Dropbox/LockDownPolicyDiffusion/R
> eplicationMaterials/ToPost/LogMainAnalysis.log
  log type:  text
 opened on:  14 Aug 2025, 11:58:11

. do "/var/folders/y7/8dkxt_cx5xg5622893vcmf5m0000gn/T//SD01042.000000"

. *************************************
. *** Preliminary steps
. 
. /* In order to successfully replicate the results, you need to install the 
> following packages: 
> 
> st0085_2.pkg        from:  http://www.stata-journal.com/software/sj14-2/
> 
> reghdfe             from http://fmwww.bc.edu/RePEc/bocode/r
> 
> outreg2.pkg         from:  http://fmwww.bc.edu/RePEc/bocode/o/
> 
> In addition, ensure you have ftools (required by reghdfe), which can be install
> ed with
> 
> ssc install ftools
> 
> */
. 
. /* The code assumes you have set the working directory to the folder that 
> contains the datasets. All outputs are save to that same folder. 
> */
. 
. 
. ***********************************
. * Figure 1 
. ***********************************
. 
. use CDS_DMITD_replication.dta, clear

. 
. 
.  
. xtset countryname_code  date2

Panel variable: countryname_code (strongly balanced)
 Time variable: date2, 01jan2020 to 11mar2022
         Delta: 1 day

. 
. gen deltawindexinrow=windexinrow-l.windexinrow
(38 missing values generated)

. 
. gen pos = 1 if l.deltawindexinrow>=0 & MV>6
(11,924 missing values generated)

. 
. recode pos(.=0) if MV>6
(11,696 changes made to pos)

. 
. sort  date2 

. by   date2: egen pos_day = mean(pos)
(228 missing values generated)

. collapse (mean) pos_day, by(month_code)

. 
. tsset month_code

Time variable: month_code, 1 to 27
        Delta: 1 unit

. tsline pos_day, ytitle("Fraction of Country-Days with {&Delta}{subscript:it}{&g
> e}0") xtitle("Month") xlabel(1 "2020" 13 "2021" 25 "2022") ///
> scheme(s2mono) graphregion(fcolor(white)) 

. 
. graph export "Figure1.eps", as(eps) name("Graph") preview(off) replace
file Figure1.eps saved as EPS format

. 
. graph export "Figure1pdf.pdf", as(pdf) name("Graph") replace
file
    /Users/stanig/Library/CloudStorage/Dropbox/LockDownPolicyDiffusion/Replicat
    > ionMaterials/ToPost/Figure1pdf.pdf saved as PDF format

. 
. ***********************************
. * PAPER MODELS
. ***********************************
. 
. use CDS_DMITD_replication.dta, clear

. 
. xtset countryname_code date2

Panel variable: countryname_code (strongly balanced)
 Time variable: date2, 01jan2020 to 11mar2022
         Delta: 1 day

. 
. 
. gen deltawindexinrow=windexinrow-l.windexinrow
(38 missing values generated)

. 
. ***********************************
. * TABLE 1 
. ***********************************
. 
. 
. 
. gen lstringencyindex = l.stringencyindex
(38 missing values generated)

. gen lwindexinrow = l.windexinrow 
(38 missing values generated)

. gen lwtraderow = l.wtraderow
(38 missing values generated)

. gen lwnationrow = l.wnationrow 
(1,638 missing values generated)

. gen lwindexideorow =l.windexideorow
(1,638 missing values generated)

. gen lnew_cases_per_million2 = l.new_cases_per_million2
(38 missing values generated)

. gen lnew_deaths_per_million2 = l.new_deaths_per_million2
(38 missing values generated)

. 
. label variable lstringencyindex "Stringency (lag)"

. label variable lwindexinrow "Geography (lag)"

. label variable lwtraderow "Trade (lag)"

. label variable lwnationrow "Nationalism (lag)"

. label variable lwindexideorow "Left-Right (lag)"

. label variable lnew_cases_per_million2 "New Cases (lag)"

. label variable lnew_deaths_per_million2 "New Deaths (lag)"

. 
. 
. ** Notice: MV>6 makes the analysis start with January 7 2020.
. 
. *******************************************************************************
> *****
. ******** TABLE 1 Baseline models of policy diffusion outreg
. *******************************************************************************
> *****
. 
. reghdfe stringencyindex lstringencyindex lwindexinrow lnew_cases_per_million2 /
> //
> lnew_deaths_per_million2 if MV>6,    abs(countryname_code month_code) vce(r)  
(MWFE estimator converged in 2 iterations)

HDFE Linear regression                            Number of obs   =     30,210
Absorbing 2 HDFE groups                           F(   4,  30142) =  114112.29
                                                  Prob > F        =     0.0000
                                                  R-squared       =     0.9887
                                                  Adj R-squared   =     0.9886
                                                  Within R-sq.    =     0.9658
                                                  Root MSE        =     2.2501

--------------------------------------------------------------------------------
               |               Robust
stringencyin~x | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
---------------+----------------------------------------------------------------
lstringencyi~x |   .9781765   .0017807   549.31   0.000     .9746861    .9816668
  lwindexinrow |   .0184249   .0044797     4.11   0.000     .0096444    .0272054
lnew_cases_p~2 |   .0000113   .0000336     0.34   0.736    -.0000545    .0000772
lnew_deaths_~2 |   .0187082   .0054309     3.44   0.001     .0080634    .0293529
         _cons |   .1879506   .2012844     0.93   0.350    -.2065754    .5824765
--------------------------------------------------------------------------------

Absorbed degrees of freedom:
----------------------------------------------------------+
      Absorbed FE | Categories  - Redundant  = Num. Coefs |
------------------+---------------------------------------|
 countryname_code |        38           0          38     |
       month_code |        27           1          26     |
----------------------------------------------------------+

. 
. outreg2 est1 using table1.tex, replace keep(lwindexinrow  lwtraderow lwindexide
> orow lwnationrow lstringencyindex lnew_cases_per_million2 lnew_deaths_per_milli
> on2)  alpha(0.001, 0.01, 0.05)nocons   word label dec(3)     tex addtext(Countr
> y FE, YES, Month FE, YES)  
table1.tex
table1.rtf
dir : seeout

. 
. reghdfe stringencyindex lstringencyindex lwtraderow lnew_cases_per_million2 ///
> lnew_deaths_per_million2 if MV>6,    abs(countryname_code month_code) vce(r)  
(MWFE estimator converged in 2 iterations)

HDFE Linear regression                            Number of obs   =     30,210
Absorbing 2 HDFE groups                           F(   4,  30142) =  113904.19
                                                  Prob > F        =     0.0000
                                                  R-squared       =     0.9887
                                                  Adj R-squared   =     0.9886
                                                  Within R-sq.    =     0.9658
                                                  Root MSE        =     2.2505

--------------------------------------------------------------------------------
               |               Robust
stringencyin~x | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
---------------+----------------------------------------------------------------
lstringencyi~x |   .9786603   .0018304   534.68   0.000     .9750727    .9822479
    lwtraderow |   .0162237   .0045364     3.58   0.000     .0073322    .0251152
lnew_cases_p~2 |   .0000209   .0000337     0.62   0.536    -.0000452     .000087
lnew_deaths_~2 |    .018384   .0054313     3.38   0.001     .0077383    .0290297
         _cons |   .2204747   .2145868     1.03   0.304    -.2001246     .641074
--------------------------------------------------------------------------------

Absorbed degrees of freedom:
----------------------------------------------------------+
      Absorbed FE | Categories  - Redundant  = Num. Coefs |
------------------+---------------------------------------|
 countryname_code |        38           0          38     |
       month_code |        27           1          26     |
----------------------------------------------------------+

. 
. outreg2  est2 using table1.tex, keep(lwindexinrow  lwtraderow lwindexideorow lw
> nationrow lstringencyindex lnew_cases_per_million2 lnew_deaths_per_million2)  a
> lpha(0.001, 0.01, 0.05)nocons   word label dec(3)    tex addtext(Country FE, YE
> S, Month FE, YES)  
table1.tex
table1.rtf
dir : seeout

. 
. reghdfe stringencyindex lstringencyindex lwindexideorow lnew_cases_per_million2
>  ///
> lnew_deaths_per_million2 if MV>6,    abs(countryname_code month_code) vce(r)  
(MWFE estimator converged in 2 iterations)

HDFE Linear regression                            Number of obs   =     28,620
Absorbing 2 HDFE groups                           F(   4,  28554) =  107509.11
                                                  Prob > F        =     0.0000
                                                  R-squared       =     0.9884
                                                  Adj R-squared   =     0.9884
                                                  Within R-sq.    =     0.9653
                                                  Root MSE        =     2.2751

--------------------------------------------------------------------------------
               |               Robust
stringencyin~x | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
---------------+----------------------------------------------------------------
lstringencyi~x |   .9809879   .0016118   608.64   0.000     .9778288    .9841471
lwindexideorow |   .0045268   .0027325     1.66   0.098    -.0008289    .0098826
lnew_cases_p~2 |   .0000206   .0000346     0.59   0.553    -.0000473    .0000884
lnew_deaths_~2 |   .0216194   .0057288     3.77   0.000     .0103906    .0328481
         _cons |   .7462163   .1521133     4.91   0.000     .4480672    1.044365
--------------------------------------------------------------------------------

Absorbed degrees of freedom:
----------------------------------------------------------+
      Absorbed FE | Categories  - Redundant  = Num. Coefs |
------------------+---------------------------------------|
 countryname_code |        36           0          36     |
       month_code |        27           1          26     |
----------------------------------------------------------+

. 
. outreg2  est2 using table1.tex, keep(lwindexinrow  lwtraderow lwindexideorow lw
> nationrow lstringencyindex lnew_cases_per_million2 lnew_deaths_per_million2)  a
> lpha(0.001, 0.01, 0.05) nocons   word label dec(3)      tex addtext(Country FE,
>  YES, Month FE, YES)  
table1.tex
table1.rtf
dir : seeout

. 
. reghdfe stringencyindex lstringencyindex lwnationrow lnew_cases_per_million2 //
> /
> lnew_deaths_per_million2 if MV>6,    abs(countryname_code month_code) vce(r)  
(MWFE estimator converged in 2 iterations)

HDFE Linear regression                            Number of obs   =     28,620
Absorbing 2 HDFE groups                           F(   4,  28554) =  106511.59
                                                  Prob > F        =     0.0000
                                                  R-squared       =     0.9884
                                                  Adj R-squared   =     0.9884
                                                  Within R-sq.    =     0.9653
                                                  Root MSE        =     2.2750

--------------------------------------------------------------------------------
               |               Robust
stringencyin~x | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
---------------+----------------------------------------------------------------
lstringencyi~x |   .9806913   .0016456   595.96   0.000     .9774659    .9839167
   lwnationrow |   .0061354   .0026564     2.31   0.021     .0009288    .0113421
lnew_cases_p~2 |   .0000193   .0000346     0.56   0.577    -.0000485    .0000871
lnew_deaths_~2 |   .0221659   .0057472     3.86   0.000      .010901    .0334308
         _cons |   .6707422   .1477035     4.54   0.000     .3812364     .960248
--------------------------------------------------------------------------------

Absorbed degrees of freedom:
----------------------------------------------------------+
      Absorbed FE | Categories  - Redundant  = Num. Coefs |
------------------+---------------------------------------|
 countryname_code |        36           0          36     |
       month_code |        27           1          26     |
----------------------------------------------------------+

. 
. outreg2  est2 using table1.tex, keep(lwindexinrow  lwtraderow lwindexideorow lw
> nationrow lstringencyindex lnew_cases_per_million2 lnew_deaths_per_million2)  a
> lpha(0.001, 0.01, 0.05) nocons   word label dec(3)      tex addtext(Country FE,
>  YES, Month FE, YES)  
table1.tex
table1.rtf
dir : seeout

. 
. reghdfe stringencyindex lstringencyindex   lwindexinrow  lwtraderow lwnationrow
>   lnew_cases_per_million2 ///
> lnew_deaths_per_million2 if MV>6,    abs(countryname_code month_code) vce(r)  
(MWFE estimator converged in 2 iterations)

HDFE Linear regression                            Number of obs   =     28,620
Absorbing 2 HDFE groups                           F(   6,  28552) =   73015.24
                                                  Prob > F        =     0.0000
                                                  R-squared       =     0.9884
                                                  Adj R-squared   =     0.9884
                                                  Within R-sq.    =     0.9654
                                                  Root MSE        =     2.2736

--------------------------------------------------------------------------------
               |               Robust
stringencyin~x | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
---------------+----------------------------------------------------------------
lstringencyi~x |   .9781223   .0018685   523.48   0.000       .97446    .9817847
  lwindexinrow |   .0276528   .0091181     3.03   0.002      .009781    .0455247
    lwtraderow |  -.0081931   .0085178    -0.96   0.336    -.0248883    .0085022
   lwnationrow |  -.0027368   .0028387    -0.96   0.335    -.0083008    .0028272
lnew_cases_p~2 |   .0000143   .0000351     0.41   0.684    -.0000544     .000083
lnew_deaths_~2 |   .0204398    .005748     3.56   0.000     .0091735     .031706
         _cons |   .2974017   .2208703     1.35   0.178    -.1355144    .7303178
--------------------------------------------------------------------------------

Absorbed degrees of freedom:
----------------------------------------------------------+
      Absorbed FE | Categories  - Redundant  = Num. Coefs |
------------------+---------------------------------------|
 countryname_code |        36           0          36     |
       month_code |        27           1          26     |
----------------------------------------------------------+

. 
. outreg2  est2 using table1.tex, keep(lwindexinrow  lwtraderow lwindexideorow lw
> nationrow lstringencyindex lnew_cases_per_million2 lnew_deaths_per_million2)  a
> lpha(0.001, 0.01, 0.05) nocons   word label dec(3)      tex addtext(Country FE,
>  YES, Month FE, YES)  
table1.tex
table1.rtf
dir : seeout

. 
. *******************************************************************************
> *****
. ******** TABLE 2 Models accounting for epidemic trajectories
. *******************************************************************************
> *****
. 
. cap drop with_d

. cap drop with_s

. 
. 
. ***** here preparation of complicated metrics
. 
. * first and second derivative are estimated by the 7-day difference in new deat
> hs per million (rescaled so 
. * we avoid those significant coefs with only 4 zeros after rounding
. 
.  gen first_derivative = (new_deaths_per_million2-l7.new_deaths_per_million2)/10
(266 missing values generated)

.  gen second_derivative = (first_derivative-l7.first_derivative)/10
(532 missing values generated)

. 
. * first and second derivative are estimated by the 7-day difference in new case
> s per million
.  gen cases_first_derivative = (new_cases_per_million2-l7.new_cases_per_million2
> )/10
(266 missing values generated)

.  gen cases_second_derivative = (cases_first_derivative-l7.cases_first_derivativ
> e)/10
(532 missing values generated)

. 
. ** a dummy for "exponential growth" of deaths, where new deaths are increasing 
> at an increasing rate
.  gen exponential_phase=first>0&second>0 &first!=.&second!=.

.  replace exponential_phas=. if first==.|cases_second==.
(532 real changes made, 532 to missing)

.  gen cases_exponential_phase = cases_first>0 &cases_second>0 

.  replace cases_exponential_phas=. if cases_first==.|cases_second==.
(532 real changes made, 532 to missing)

. 
. *** dummies for the sign of the derivatives 
.  gen sign_first=first>0 

.  replace sign_f =. if first==.
(266 real changes made, 266 to missing)

.  gen sign_second=second>0 

.  replace sign_s =. if second==.
(532 real changes made, 532 to missing)

.  gen cases_sign_first=cases_first>0 

.  replace cases_sign_first=. if cases_first==.
(266 real changes made, 266 to missing)

.  gen cases_sign_second=cases_second>0  

.  replace cases_sign_second=. if cases_second==.
(532 real changes made, 532 to missing)

. 
. 
. gen lfirst = l.first
(304 missing values generated)

. gen lsecond = l.second 
(570 missing values generated)

. gen lsign_f = l.sign_f 
(304 missing values generated)

. gen lsign_s = l.sign_s
(570 missing values generated)

. gen lcases_fir = l.cases_fir 
(304 missing values generated)

. gen lcases_sec = l.cases_sec
(570 missing values generated)

. gen lcases_sign_f = l.cases_sign_f 
(304 missing values generated)

. gen lcases_sign_s = l.cases_sign_s
(570 missing values generated)

. gen lexponential = l.exponential
(570 missing values generated)

. gen inter_exp =l.exponential*l.new_deaths_per_million2 
(570 missing values generated)

. gen inter_cas =l.exponential*l.new_cases_per_million2 
(570 missing values generated)

. gen lcases_exponential = l.cases_exponential
(570 missing values generated)

. gen inter_cas2 = l.cases_exponential*l.new_cases_per_million2  
(570 missing values generated)

. gen inter_exp2 = l.cases_exponential*l.new_deaths_per_million2
(570 missing values generated)

. 
. 
. *******************************************************************************
> *****
. ******** TABLE 2 Models accounting for epidemic trajectories outreg
. *******************************************************************************
> *****
. 
. * column 1
. reghdfe stringencyindex lstringencyindex lwindexinrow lnew_cases_per_million2  
> lnew_deaths_per_million2  lfirst lsecond if MV>6,    abs(countryname_code month
> _code) vce(r) 
(MWFE estimator converged in 2 iterations)

HDFE Linear regression                            Number of obs   =     29,868
Absorbing 2 HDFE groups                           F(   6,  29798) =   75751.27
                                                  Prob > F        =     0.0000
                                                  R-squared       =     0.9878
                                                  Adj R-squared   =     0.9878
                                                  Within R-sq.    =     0.9657
                                                  Root MSE        =     2.2624

--------------------------------------------------------------------------------
               |               Robust
stringencyin~x | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
---------------+----------------------------------------------------------------
lstringencyi~x |   .9782153   .0017866   547.53   0.000     .9747135    .9817171
  lwindexinrow |   .0181318   .0044908     4.04   0.000     .0093298    .0269339
lnew_cases_p~2 |  -1.26e-06   .0000341    -0.04   0.970    -.0000682    .0000656
lnew_deaths_~2 |   .0157302   .0055387     2.84   0.005      .004874    .0265863
        lfirst |   .4471513   .1822732     2.45   0.014     .0898879    .8044147
       lsecond |  -.9724792    1.25981    -0.77   0.440    -3.441761    1.496803
         _cons |   .2130006   .2042079     1.04   0.297    -.1872559    .6132571
--------------------------------------------------------------------------------

Absorbed degrees of freedom:
----------------------------------------------------------+
      Absorbed FE | Categories  - Redundant  = Num. Coefs |
------------------+---------------------------------------|
 countryname_code |        38           0          38     |
       month_code |        27           1          26     |
----------------------------------------------------------+

. 
. outreg2 est1 using table2.tex, replace keep(lstringencyindex lwindexinrow  lnew
> _cases_per_million2 lnew_deaths_per_million2 lfirst lsecond  lsign_f lsign_s  l
> first lsecond lcases_fir lcases_sec lsign_f lsign_s lcases_sign_f lcases_sign_s
>  lexponential inter_exp lcases_exponential inter_cas2 inter_cas inter_exp2 )  a
> lpha(0.001, 0.01, 0.05) nocons   word label dec(3)     tex addtext(Country FE, 
> YES, Month FE, YES)  
table2.tex
table2.rtf
dir : seeout

. 
. * column 2
. reghdfe stringencyindex lstringencyindex lwindexinrow lnew_cases_per_million2  
> lnew_deaths_per_million2  lsign_f lsign_s if MV>6,    abs(countryname_code mont
> h_code) vce(r) 
(MWFE estimator converged in 2 iterations)

HDFE Linear regression                            Number of obs   =     29,868
Absorbing 2 HDFE groups                           F(   6,  29798) =   76134.08
                                                  Prob > F        =     0.0000
                                                  R-squared       =     0.9878
                                                  Adj R-squared   =     0.9878
                                                  Within R-sq.    =     0.9657
                                                  Root MSE        =     2.2618

--------------------------------------------------------------------------------
               |               Robust
stringencyin~x | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
---------------+----------------------------------------------------------------
lstringencyi~x |   .9779323   .0017883   546.84   0.000      .974427    .9814375
  lwindexinrow |   .0172399   .0044724     3.85   0.000     .0084737    .0260061
lnew_cases_p~2 |  -8.50e-06   .0000341    -0.25   0.803    -.0000752    .0000582
lnew_deaths_~2 |   .0180946    .005435     3.33   0.001     .0074418    .0287474
       lsign_f |   .1373034   .0295988     4.64   0.000     .0792885    .1953184
       lsign_s |   .0140938   .0278689     0.51   0.613    -.0405304     .068718
         _cons |   .2059755    .203564     1.01   0.312    -.1930188    .6049697
--------------------------------------------------------------------------------

Absorbed degrees of freedom:
----------------------------------------------------------+
      Absorbed FE | Categories  - Redundant  = Num. Coefs |
------------------+---------------------------------------|
 countryname_code |        38           0          38     |
       month_code |        27           1          26     |
----------------------------------------------------------+

. 
. outreg2 est1 using table2.tex,  keep(lstringencyindex lwindexinrow  lnew_cases_
> per_million2 lnew_deaths_per_million2 lfirst lsecond  lsign_f lsign_s  lfirst l
> second lcases_fir lcases_sec lsign_f lsign_s lcases_sign_f lcases_sign_s lexpon
> ential inter_exp lcases_exponential inter_cas2 inter_cas inter_exp2 )  alpha(0.
> 001, 0.01, 0.05) nocons   word label dec(3)     tex addtext(Country FE, YES, Mo
> nth FE, YES)  
table2.tex
table2.rtf
dir : seeout

. 
. gen with_sign=e(sample)

. ** with first and second derivative of cases too
. 
. * column 3
. reghdfe stringencyindex lstringencyindex lwindexinrow lnew_cases_per_million2  
> lnew_deaths_per_million2 lfirst lsecond lcases_fir lcases_sec if MV>6,    abs(c
> ountryname_code month_code) vce(r) 
(MWFE estimator converged in 2 iterations)

HDFE Linear regression                            Number of obs   =     29,868
Absorbing 2 HDFE groups                           F(   8,  29796) =   56922.74
                                                  Prob > F        =     0.0000
                                                  R-squared       =     0.9878
                                                  Adj R-squared   =     0.9878
                                                  Within R-sq.    =     0.9657
                                                  Root MSE        =     2.2621

--------------------------------------------------------------------------------
               |               Robust
stringencyin~x | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
---------------+----------------------------------------------------------------
lstringencyi~x |    .978036   .0017929   545.50   0.000     .9745218    .9815502
  lwindexinrow |   .0180692   .0044927     4.02   0.000     .0092633    .0268752
lnew_cases_p~2 |  -.0000458   .0000342    -1.34   0.181    -.0001128    .0000213
lnew_deaths_~2 |   .0195959   .0058473     3.35   0.001      .008135    .0310569
        lfirst |   .4361813   .1841641     2.37   0.018     .0752115    .7971511
       lsecond |  -1.247828   1.247288    -1.00   0.317    -3.692568    1.196911
    lcases_fir |   .0023881   .0010754     2.22   0.026     .0002804    .0044959
    lcases_sec |   -.005804   .0083731    -0.69   0.488    -.0222156    .0106076
         _cons |   .2279245   .2047778     1.11   0.266    -.1734489    .6292978
--------------------------------------------------------------------------------

Absorbed degrees of freedom:
----------------------------------------------------------+
      Absorbed FE | Categories  - Redundant  = Num. Coefs |
------------------+---------------------------------------|
 countryname_code |        38           0          38     |
       month_code |        27           1          26     |
----------------------------------------------------------+

. 
. outreg2 est1 using table2.tex,  keep(lstringencyindex lwindexinrow  lnew_cases_
> per_million2 lnew_deaths_per_million2 lfirst lsecond  lsign_f lsign_s  lfirst l
> second lcases_fir lcases_sec lsign_f lsign_s lcases_sign_f lcases_sign_s lexpon
> ential inter_exp lcases_exponential inter_cas2 inter_cas inter_exp2 )  alpha(0.
> 001, 0.01, 0.05) nocons   word label dec(3)     tex addtext(Country FE, YES, Mo
> nth FE, YES)  
table2.tex
table2.rtf
dir : seeout

. 
. ** with sign of first and second derivative of cases too
. 
. * column 4
. reghdfe stringencyindex lstringencyindex lwindexinrow lnew_cases_per_million2  
> lnew_deaths_per_million2 lsign_f lsign_s lcases_sign_f lcases_sign_s if MV>6,  
>   abs(countryname_code month_code) vce(r) 
(MWFE estimator converged in 2 iterations)

HDFE Linear regression                            Number of obs   =     29,868
Absorbing 2 HDFE groups                           F(   8,  29796) =   57516.61
                                                  Prob > F        =     0.0000
                                                  R-squared       =     0.9878
                                                  Adj R-squared   =     0.9878
                                                  Within R-sq.    =     0.9658
                                                  Root MSE        =     2.2607

--------------------------------------------------------------------------------
               |               Robust
stringencyin~x | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
---------------+----------------------------------------------------------------
lstringencyi~x |   .9781267   .0017854   547.85   0.000     .9746272    .9816261
  lwindexinrow |   .0172094   .0044713     3.85   0.000     .0084456    .0259733
lnew_cases_p~2 |   -.000016    .000034    -0.47   0.637    -.0000826    .0000506
lnew_deaths_~2 |    .023136   .0055198     4.19   0.000     .0123169    .0339551
       lsign_f |   .1110039   .0297159     3.74   0.000     .0527595    .1692482
       lsign_s |   .0052966   .0278816     0.19   0.849    -.0493524    .0599457
 lcases_sign_f |   .1438887   .0291394     4.94   0.000     .0867741    .2010033
 lcases_sign_s |     .05134    .026851     1.91   0.056     -.001289    .1039691
         _cons |   .0980613   .2033339     0.48   0.630    -.3004821    .4966046
--------------------------------------------------------------------------------

Absorbed degrees of freedom:
----------------------------------------------------------+
      Absorbed FE | Categories  - Redundant  = Num. Coefs |
------------------+---------------------------------------|
 countryname_code |        38           0          38     |
       month_code |        27           1          26     |
----------------------------------------------------------+

. 
. outreg2 est1 using table2.tex,  keep(lstringencyindex lwindexinrow  lnew_cases_
> per_million2 lnew_deaths_per_million2 lfirst lsecond  lsign_f lsign_s  lfirst l
> second lcases_fir lcases_sec lsign_f lsign_s lcases_sign_f lcases_sign_s lexpon
> ential inter_exp lcases_exponential inter_cas2 inter_cas inter_exp2 )  alpha(0.
> 001, 0.01, 0.05) nocons   word label dec(3)     tex addtext(Country FE, YES, Mo
> nth FE, YES)  
table2.tex
table2.rtf
dir : seeout

. 
. ** with exponential (deaths) dummy interacted with new deaths
. 
. * column 5
. reghdfe stringencyindex lstringencyindex lwindexinrow lnew_cases_per_million2 l
> exponential lnew_deaths_per_million2 inter_exp  if MV>6,    abs(countryname_cod
> e month_code) vce(r) 
(MWFE estimator converged in 2 iterations)

HDFE Linear regression                            Number of obs   =     29,868
Absorbing 2 HDFE groups                           F(   6,  29798) =   76321.92
                                                  Prob > F        =     0.0000
                                                  R-squared       =     0.9878
                                                  Adj R-squared   =     0.9878
                                                  Within R-sq.    =     0.9657
                                                  Root MSE        =     2.2622

--------------------------------------------------------------------------------
               |               Robust
stringencyin~x | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
---------------+----------------------------------------------------------------
lstringencyi~x |   .9780038   .0017891   546.64   0.000      .974497    .9815105
  lwindexinrow |   .0175732   .0044728     3.93   0.000     .0088063    .0263401
lnew_cases_p~2 |  -1.00e-07   .0000337    -0.00   0.998    -.0000661    .0000659
  lexponential |   .1078969   .0360457     2.99   0.003     .0372458    .1785479
lnew_deaths_~2 |   .0186375    .006255     2.98   0.003     .0063774    .0308976
     inter_exp |   .0020087   .0078579     0.26   0.798    -.0133931    .0174105
         _cons |   .2098187   .2034204     1.03   0.302    -.1888942    .6085315
--------------------------------------------------------------------------------

Absorbed degrees of freedom:
----------------------------------------------------------+
      Absorbed FE | Categories  - Redundant  = Num. Coefs |
------------------+---------------------------------------|
 countryname_code |        38           0          38     |
       month_code |        27           1          26     |
----------------------------------------------------------+

. 
. outreg2 est1 using table2.tex,  keep(lstringencyindex lwindexinrow  lnew_cases_
> per_million2 lnew_deaths_per_million2 lfirst lsecond  lsign_f lsign_s  lfirst l
> second lcases_fir lcases_sec lsign_f lsign_s lcases_sign_f lcases_sign_s lexpon
> ential inter_exp lcases_exponential inter_cas2 inter_cas inter_exp2 )  alpha(0.
> 001, 0.01, 0.05) nocons   word label dec(3)     tex addtext(Country FE, YES, Mo
> nth FE, YES)  
table2.tex
table2.rtf
dir : seeout

. 
. ** with exponential deaths and exponential cases interacted with new deaths and
>  new cases 
. 
. * column 6
. reghdfe stringencyindex lstringencyindex lwindexinrow   lnew_deaths_per_million
> 2 lexponential lnew_deaths_per_million2 inter_exp lcases_exponential inter_cas 
> inter_exp2 inter_cas2  if MV>6,    abs(countryname_code month_code) vce(r) 
(MWFE estimator converged in 2 iterations)
note: lnew_deaths_per_million2 omitted because of collinearity

HDFE Linear regression                            Number of obs   =     29,868
Absorbing 2 HDFE groups                           F(   9,  29795) =   51281.62
                                                  Prob > F        =     0.0000
                                                  R-squared       =     0.9878
                                                  Adj R-squared   =     0.9878
                                                  Within R-sq.    =     0.9657
                                                  Root MSE        =     2.2610

--------------------------------------------------------------------------------
               |               Robust
stringencyin~x | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
---------------+----------------------------------------------------------------
lstringencyi~x |   .9782432   .0017874   547.31   0.000     .9747399    .9817465
  lwindexinrow |   .0176957   .0044687     3.96   0.000     .0089368    .0264545
lnew_deaths_~2 |    .024406   .0063738     3.83   0.000     .0119131    .0368989
  lexponential |   .0891817   .0374408     2.38   0.017     .0157961    .1625672
lnew_deaths_~2 |          0  (omitted)
     inter_exp |   .0034449   .0081541     0.42   0.673    -.0125375    .0194274
lcases_expon~l |   .1861594   .0336964     5.52   0.000     .1201131    .2522058
     inter_cas |  -.0000183   .0000415    -0.44   0.659    -.0000997    .0000631
    inter_exp2 |  -.0097904    .008959    -1.09   0.274    -.0273504    .0077697
    inter_cas2 |    .000013    .000033     0.39   0.694    -.0000517    .0000777
         _cons |    .117188   .2033428     0.58   0.564    -.2813729    .5157488
--------------------------------------------------------------------------------

Absorbed degrees of freedom:
----------------------------------------------------------+
      Absorbed FE | Categories  - Redundant  = Num. Coefs |
------------------+---------------------------------------|
 countryname_code |        38           0          38     |
       month_code |        27           1          26     |
----------------------------------------------------------+

. 
. outreg2 est1 using table2.tex,  keep(lstringencyindex lwindexinrow  lnew_cases_
> per_million2 lnew_deaths_per_million2 lfirst lsecond  lsign_f lsign_s  lfirst l
> second lcases_fir lcases_sec lsign_f lsign_s lcases_sign_f lcases_sign_s lexpon
> ential inter_exp lcases_exponential inter_cas2 inter_cas inter_exp2 )  alpha(0.
> 001, 0.01, 0.05) nocons   word label dec(3)     tex addtext(Country FE, YES, Mo
> nth FE, YES)  
table2.tex
table2.rtf
dir : seeout

. 
. 
. *******************************************************************************
> *****
. ******** TABLE 3 Split-sample models based on the sign of delta
. *******************************************************************************
> *****
. 
. reghdfe stringencyindex lstringencyindex lwindexinrow lnew_cases_per_million2 /
> //
> lnew_deaths_per_million2  if l.deltawindexinrow>=0  & MV>6,    abs(countryname_
> code month_code) vce(r)  
(MWFE estimator converged in 4 iterations)

HDFE Linear regression                            Number of obs   =     18,514
Absorbing 2 HDFE groups                           F(   4,  18446) =   76460.00
                                                  Prob > F        =     0.0000
                                                  R-squared       =     0.9901
                                                  Adj R-squared   =     0.9900
                                                  Within R-sq.    =     0.9671
                                                  Root MSE        =     2.3170

--------------------------------------------------------------------------------
               |               Robust
stringencyin~x | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
---------------+----------------------------------------------------------------
lstringencyi~x |   .9766619   .0022824   427.91   0.000     .9721882    .9811357
  lwindexinrow |   .0213979   .0050585     4.23   0.000     .0114827     .031313
lnew_cases_p~2 |   .0000802   .0000527     1.52   0.128    -.0000231    .0001834
lnew_deaths_~2 |   .0121065   .0077368     1.56   0.118    -.0030583    .0272712
         _cons |   .2125358   .2059901     1.03   0.302    -.1912239    .6162955
--------------------------------------------------------------------------------

Absorbed degrees of freedom:
----------------------------------------------------------+
      Absorbed FE | Categories  - Redundant  = Num. Coefs |
------------------+---------------------------------------|
 countryname_code |        38           0          38     |
       month_code |        27           1          26     |
----------------------------------------------------------+

. 
. outreg2 est1 using table3.tex, replace keep(lwindexinrow  lstringencyindex lnew
> _cases_per_million2 lnew_deaths_per_million2) alpha(0.001, 0.01, 0.05) nocons  
>  word label dec(3)     tex addtext(Delta, >=0, Country FE, YES, Month FE, YES) 
>  
table3.tex
table3.rtf
dir : seeout

. 
. reghdfe stringencyindex lstringencyindex lwindexinrow lnew_cases_per_million2 /
> //
> lnew_deaths_per_million2  if l.deltawindexinrow<0  & MV>6,    abs(countryname_c
> ode month_code) vce(r)  
(MWFE estimator converged in 4 iterations)

HDFE Linear regression                            Number of obs   =     11,696
Absorbing 2 HDFE groups                           F(   4,  11631) =   39056.64
                                                  Prob > F        =     0.0000
                                                  R-squared       =     0.9832
                                                  Adj R-squared   =     0.9831
                                                  Within R-sq.    =     0.9624
                                                  Root MSE        =     2.1376

--------------------------------------------------------------------------------
               |               Robust
stringencyin~x | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
---------------+----------------------------------------------------------------
lstringencyi~x |   .9799749   .0028114   348.58   0.000     .9744642    .9854857
  lwindexinrow |   .0000549   .0095292     0.01   0.995     -.018624    .0187339
lnew_cases_p~2 |  -.0000369   .0000434    -0.85   0.396     -.000122    .0000482
lnew_deaths_~2 |   .0296593   .0067889     4.37   0.000     .0163519    .0429667
         _cons |   .9496444   .4986892     1.90   0.057    -.0278702    1.927159
--------------------------------------------------------------------------------

Absorbed degrees of freedom:
----------------------------------------------------------+
      Absorbed FE | Categories  - Redundant  = Num. Coefs |
------------------+---------------------------------------|
 countryname_code |        38           0          38     |
       month_code |        24           1          23     |
----------------------------------------------------------+

. 
. outreg2 est1 using table3.tex,  keep(lwindexinrow  lstringencyindex lnew_cases_
> per_million2 lnew_deaths_per_million2) alpha(0.001, 0.01, 0.05) nocons   word l
> abel dec(3)     tex addtext(Delta, <0, Country FE, YES, Month FE, YES)  
table3.tex
table3.rtf
dir : seeout

. 
. 
. *******************************************************************************
> *****
. ******** TABLE 4 government effectiveness
. *******************************************************************************
> *****
. 
. * World Bank variables: Voice and Accountability (vae), Political Stability and
>  Absence of Violence/Terrorism (pve), Government Effectiveness (gee), Regulator
> y Quality (rqe), Rule of Law (rle), and Control of Corruption (cce)
. 
. 
. ** merge to healthcare (and SPI used later)
. 
. drop _merge 

. 
. merge m:1 iso_code using "merged_healthcare_dataset.dta"

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                            30,438  (_merge==3)
    -----------------------------------------

. 
. xtset countryname_code date2

Panel variable: countryname_code (strongly balanced)
 Time variable: date2, 01jan2020 to 11mar2022
         Delta: 1 day

. 
. gen inter = lwindexinrow*gee
(38 missing values generated)

. gen inter2 = lnew_deaths_per_million2*gee
(38 missing values generated)

. 
. label variable inter "W Geography (lag) * Government Effectiveness"

. label variable inter2 "New Deaths (lag) * Government Effectiveness"

. 
. 
. *******************************************************************************
> *****
. ******** TABLE 4 outreg  government effectiveness
. *******************************************************************************
> *****
. 
. reghdfe stringencyindex  lstringencyindex lwindexinrow inter  lnew_deaths_per_m
> illion2 inter2    lnew_cases_per_million2 ///
>  if  MV>6 ,     abs(countryname_code month_code) vce(r)
(MWFE estimator converged in 2 iterations)

HDFE Linear regression                            Number of obs   =     30,210
Absorbing 2 HDFE groups                           F(   6,  30140) =   76710.08
                                                  Prob > F        =     0.0000
                                                  R-squared       =     0.9887
                                                  Adj R-squared   =     0.9886
                                                  Within R-sq.    =     0.9659
                                                  Root MSE        =     2.2499

--------------------------------------------------------------------------------
               |               Robust
stringencyin~x | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
---------------+----------------------------------------------------------------
lstringencyi~x |   .9779756   .0017953   544.74   0.000     .9744567    .9814945
  lwindexinrow |   .0227918    .005089     4.48   0.000     .0128171    .0327665
         inter |  -.0036454   .0013499    -2.70   0.007    -.0062912   -.0009995
lnew_deaths_~2 |   .0008363      .0094     0.09   0.929    -.0175882    .0192607
        inter2 |   .0190753   .0094026     2.03   0.042     .0006458    .0375048
lnew_cases_p~2 |   7.22e-06   .0000335     0.22   0.829    -.0000585    .0000729
         _cons |   .1917965   .2008878     0.95   0.340    -.2019522    .5855452
--------------------------------------------------------------------------------

Absorbed degrees of freedom:
----------------------------------------------------------+
      Absorbed FE | Categories  - Redundant  = Num. Coefs |
------------------+---------------------------------------|
 countryname_code |        38           0          38     |
       month_code |        27           1          26     |
----------------------------------------------------------+

. 
.  outreg2 est1 using table4.tex, replace keep(lstringencyindex lwindexinrow inte
> r  lnew_deaths_per_million2 inter2    lnew_cases_per_million2) alpha(0.001, 0.0
> 1, 0.05)  nocons   word label dec(3)     tex addtext(Delta, All, Country FE, YE
> S, Month FE, YES)  
table4.tex
table4.rtf
dir : seeout

.  
. reghdfe stringencyindex  lstringencyindex lwindexinrow inter  lnew_deaths_per_m
> illion2 inter2    lnew_cases_per_million2 ///
>  if l.deltawindexinrow>=0  & MV>6 ,     abs(countryname_code month_code) vce(r)
(MWFE estimator converged in 4 iterations)

HDFE Linear regression                            Number of obs   =     18,514
Absorbing 2 HDFE groups                           F(   6,  18444) =   51668.12
                                                  Prob > F        =     0.0000
                                                  R-squared       =     0.9901
                                                  Adj R-squared   =     0.9900
                                                  Within R-sq.    =     0.9671
                                                  Root MSE        =     2.3168

--------------------------------------------------------------------------------
               |               Robust
stringencyin~x | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
---------------+----------------------------------------------------------------
lstringencyi~x |   .9763988   .0023063   423.36   0.000     .9718782    .9809193
  lwindexinrow |   .0262772   .0058977     4.46   0.000     .0147171    .0378372
         inter |  -.0040399   .0016646    -2.43   0.015    -.0073027   -.0007771
lnew_deaths_~2 |  -.0026444   .0132096    -0.20   0.841    -.0285365    .0232478
        inter2 |   .0144895   .0132403     1.09   0.274    -.0114627    .0404417
lnew_cases_p~2 |   .0000793   .0000526     1.51   0.132    -.0000239    .0001824
         _cons |   .2184878   .2053792     1.06   0.287    -.1840745    .6210502
--------------------------------------------------------------------------------

Absorbed degrees of freedom:
----------------------------------------------------------+
      Absorbed FE | Categories  - Redundant  = Num. Coefs |
------------------+---------------------------------------|
 countryname_code |        38           0          38     |
       month_code |        27           1          26     |
----------------------------------------------------------+

. 
.  outreg2 est1 using table4.tex,  keep(lstringencyindex lwindexinrow inter  lnew
> _deaths_per_million2 inter2    lnew_cases_per_million2) alpha(0.001, 0.01, 0.05
> )  nocons   word label dec(3)     tex addtext(Delta, >=0, Country FE, YES, Mont
> h FE, YES)  
table4.tex
table4.rtf
dir : seeout

.  
. reghdfe stringencyindex  lstringencyindex lwindexinrow inter  lnew_deaths_per_m
> illion2 inter2    lnew_cases_per_million2 ///
>  if l.deltawindexinrow<0  & MV>6 ,     abs(countryname_code month_code) vce(r)
(MWFE estimator converged in 4 iterations)

HDFE Linear regression                            Number of obs   =     11,696
Absorbing 2 HDFE groups                           F(   6,  11629) =   26355.05
                                                  Prob > F        =     0.0000
                                                  R-squared       =     0.9832
                                                  Adj R-squared   =     0.9831
                                                  Within R-sq.    =     0.9624
                                                  Root MSE        =     2.1374

--------------------------------------------------------------------------------
               |               Robust
stringencyin~x | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
---------------+----------------------------------------------------------------
lstringencyi~x |   .9798873   .0028383   345.24   0.000     .9743238    .9854507
  lwindexinrow |   .0042373   .0114258     0.37   0.711    -.0181591    .0266337
         inter |  -.0033632   .0034206    -0.98   0.326    -.0100682    .0033418
lnew_deaths_~2 |   .0031711   .0129697     0.24   0.807    -.0222517    .0285939
        inter2 |   .0303498   .0127501     2.38   0.017     .0053576    .0553421
lnew_cases_p~2 |   -.000045   .0000436    -1.03   0.302    -.0001305    .0000405
         _cons |   .9358415    .501175     1.87   0.062    -.0465457    1.918229
--------------------------------------------------------------------------------

Absorbed degrees of freedom:
----------------------------------------------------------+
      Absorbed FE | Categories  - Redundant  = Num. Coefs |
------------------+---------------------------------------|
 countryname_code |        38           0          38     |
       month_code |        24           1          23     |
----------------------------------------------------------+

. 
.   outreg2 est1 using table4.tex,  keep(lstringencyindex lwindexinrow inter  lne
> w_deaths_per_million2 inter2    lnew_cases_per_million2) alpha(0.001, 0.01, 0.0
> 5)  nocons   word label dec(3)     tex addtext(Delta, <0, Country FE, YES, Mont
> h FE, YES)
table4.tex
table4.rtf
dir : seeout

.   
. *******************************************************************************
> *****
. ******** TABLE 4 
. *******************************************************************************
> *****
. 
. 
. 
. reghdfe stringencyindex l.stringencyindex  l.new_cases_per_million2 ///
> l.c.new_deaths_per_million2##c.hospital_beds_p1k l.c.windexinrow##c.hospital_be
> ds_p1k if MV>6,    abs(countryname_code month_code) vce(r)  
(MWFE estimator converged in 2 iterations)
note: hospital_beds_p1k is probably collinear with the fixed effects (all partial
> led-out values are close to zero; tol = 1.0e-09)
note: hospital_beds_p1k is probably collinear with the fixed effects (all partial
> led-out values are close to zero; tol = 1.0e-09)

HDFE Linear regression                            Number of obs   =     30,210
Absorbing 2 HDFE groups                           F(   6,  30140) =   77895.28
                                                  Prob > F        =     0.0000
                                                  R-squared       =     0.9887
                                                  Adj R-squared   =     0.9886
                                                  Within R-sq.    =     0.9659
                                                  Root MSE        =     2.2494

--------------------------------------------------------------------------------
               |               Robust
stringencyin~x | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
---------------+----------------------------------------------------------------
stringencyin~x |
           L1. |   .9777094   .0017965   544.22   0.000     .9741881    .9812306
               |
new_cases_pe~2 |
           L1. |   .0000114   .0000336     0.34   0.735    -.0000546    .0000773
               |
new_deaths_p~2 |
           L1. |  -.0016728   .0136932    -0.12   0.903    -.0285122    .0251665
               |
hospital_be~1k |          0  (omitted)
               |
           cL. |
new_deaths_p~2#|
            c. |
hospital_be~1k |   .0043621   .0023695     1.84   0.066    -.0002823    .0090065
               |
   windexinrow |
           L1. |   .0247916   .0048721     5.09   0.000      .015242    .0343412
               |
hospital_be~1k |          0  (omitted)
               |
           cL. |
   windexinrow#|
            c. |
hospital_be~1k |  -.0014605   .0003192    -4.58   0.000    -.0020862   -.0008348
               |
         _cons |   .2155231   .2004915     1.07   0.282    -.1774488     .608495
--------------------------------------------------------------------------------

Absorbed degrees of freedom:
----------------------------------------------------------+
      Absorbed FE | Categories  - Redundant  = Num. Coefs |
------------------+---------------------------------------|
 countryname_code |        38           0          38     |
       month_code |        27           1          26     |
----------------------------------------------------------+

. 
. outreg2 using table4.tex,  replace  keep( L.stringencyindex L.new_cases_per_mil
> lion2 L.new_deaths_per_million2  c.l.windexinrow##c.hospital_beds_p1k c.l.new_d
> eaths_per_million2##c.hospital_beds_p1k) alpha(0.001, 0.01, 0.05)  nocons word 
> label dec(3)   tex addtext(DELTA, ALL, Controls, YES, Country FE, YES, Month FE
> , YES)  
table4.tex
table4.rtf
dir : seeout

. 
. reghdfe stringencyindex l.stringencyindex  l.new_cases_per_million2 ///
> l.c.new_deaths_per_million2##c.hospital_beds_p1k l.c.windexinrow##c.hospital_be
> ds_p1k if l.deltawindexinrow>=0 & MV>6,    abs(countryname_code month_code) vce
> (r) 
(MWFE estimator converged in 4 iterations)
note: hospital_beds_p1k is probably collinear with the fixed effects (all partial
> led-out values are close to zero; tol = 1.0e-09)
note: hospital_beds_p1k is probably collinear with the fixed effects (all partial
> led-out values are close to zero; tol = 1.0e-09)

HDFE Linear regression                            Number of obs   =     18,514
Absorbing 2 HDFE groups                           F(   6,  18444) =   52019.88
                                                  Prob > F        =     0.0000
                                                  R-squared       =     0.9901
                                                  Adj R-squared   =     0.9900
                                                  Within R-sq.    =     0.9672
                                                  Root MSE        =     2.3164

--------------------------------------------------------------------------------
               |               Robust
stringencyin~x | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
---------------+----------------------------------------------------------------
stringencyin~x |
           L1. |   .9761355   .0023057   423.36   0.000     .9716161    .9806548
               |
new_cases_pe~2 |
           L1. |   .0000788   .0000527     1.50   0.135    -.0000245     .000182
               |
new_deaths_p~2 |
           L1. |   .0004339   .0205684     0.02   0.983     -.039882    .0407498
               |
hospital_be~1k |          0  (omitted)
               |
           cL. |
new_deaths_p~2#|
            c. |
hospital_be~1k |   .0026319   .0034113     0.77   0.440    -.0040546    .0093184
               |
   windexinrow |
           L1. |   .0273639   .0055781     4.91   0.000     .0164303    .0382974
               |
hospital_be~1k |          0  (omitted)
               |
           cL. |
   windexinrow#|
            c. |
hospital_be~1k |   -.001323   .0003548    -3.73   0.000    -.0020184   -.0006276
               |
         _cons |   .2296384   .2050651     1.12   0.263    -.1723082     .631585
--------------------------------------------------------------------------------

Absorbed degrees of freedom:
----------------------------------------------------------+
      Absorbed FE | Categories  - Redundant  = Num. Coefs |
------------------+---------------------------------------|
 countryname_code |        38           0          38     |
       month_code |        27           1          26     |
----------------------------------------------------------+

. 
. outreg2 using table4.tex,    keep( L.stringencyindex L.new_cases_per_million2 L
> .new_deaths_per_million2  c.l.windexinrow##c.hospital_beds_p1k c.l.new_deaths_p
> er_million2##c.hospital_beds_p1k) alpha(0.001, 0.01, 0.05)  nocons word label d
> ec(3)   tex addtext(DELTA, POSITIVE, Controls, YES, Country FE, YES, Month FE, 
> YES)  
table4.tex
table4.rtf
dir : seeout

.  
. reghdfe stringencyindex l.stringencyindex  l.new_cases_per_million2 ///
> l.c.new_deaths_per_million2##c.hospital_beds_p1k l.c.windexinrow##c.hospital_be
> ds_p1k if l.deltawindexinrow<0 & MV>6,    abs(countryname_code month_code) vce(
> r)  
(MWFE estimator converged in 4 iterations)
note: hospital_beds_p1k is probably collinear with the fixed effects (all partial
> led-out values are close to zero; tol = 1.0e-09)
note: hospital_beds_p1k is probably collinear with the fixed effects (all partial
> led-out values are close to zero; tol = 1.0e-09)

HDFE Linear regression                            Number of obs   =     11,696
Absorbing 2 HDFE groups                           F(   6,  11629) =   26574.79
                                                  Prob > F        =     0.0000
                                                  R-squared       =     0.9832
                                                  Adj R-squared   =     0.9831
                                                  Within R-sq.    =     0.9624
                                                  Root MSE        =     2.1371

--------------------------------------------------------------------------------
               |               Robust
stringencyin~x | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
---------------+----------------------------------------------------------------
stringencyin~x |
           L1. |   .9795942   .0028275   346.45   0.000     .9740517    .9851366
               |
new_cases_pe~2 |
           L1. |  -.0000339   .0000435    -0.78   0.436    -.0001192    .0000513
               |
new_deaths_p~2 |
           L1. |  -.0095224   .0158884    -0.60   0.549    -.0406663    .0216215
               |
hospital_be~1k |          0  (omitted)
               |
           cL. |
new_deaths_p~2#|
            c. |
hospital_be~1k |   .0083676   .0031119     2.69   0.007     .0022678    .0144675
               |
   windexinrow |
           L1. |   .0063837   .0102063     0.63   0.532    -.0136224    .0263897
               |
hospital_be~1k |          0  (omitted)
               |
           cL. |
   windexinrow#|
            c. |
hospital_be~1k |  -.0018723   .0008767    -2.14   0.033    -.0035907   -.0001539
               |
         _cons |    1.08053   .5032367     2.15   0.032     .0941019    2.066959
--------------------------------------------------------------------------------

Absorbed degrees of freedom:
----------------------------------------------------------+
      Absorbed FE | Categories  - Redundant  = Num. Coefs |
------------------+---------------------------------------|
 countryname_code |        38           0          38     |
       month_code |        24           1          23     |
----------------------------------------------------------+

. 
. outreg2 using table4.tex,    keep( L.stringencyindex L.new_cases_per_million2 L
> .new_deaths_per_million2  c.l.windexinrow##c.hospital_beds_p1k c.l.new_deaths_p
> er_million2##c.hospital_beds_p1k) alpha(0.001, 0.01, 0.05)  nocons word label d
> ec(3)   tex addtext(DELTA, NEGATIVE, Controls, YES, Country FE, YES, Month FE, 
> YES)  
table4.tex
table4.rtf
dir : seeout

.  
. 
. 
. *******************************************************************************
> *****
. ******** TABLE 4 all together Models interacting institutional quality and the 
> spatial 
. *******************************************************************************
> *****
. 
. drop inter inter2

. gen inter = lwindexinrow*gee
(38 missing values generated)

. gen inter2 = lnew_deaths_per_million2*gee
(38 missing values generated)

. 
. label variable inter "W Geography (lag) * Institutions"

. label variable inter2 "New Deaths (lag) * Institutions"

. 
. reghdfe stringencyindex  lstringencyindex lwindexinrow inter  lnew_deaths_per_m
> illion2 inter2    lnew_cases_per_million2 ///
>  if  MV>6 ,     abs(countryname_code month_code) vce(r)
(MWFE estimator converged in 2 iterations)

HDFE Linear regression                            Number of obs   =     30,210
Absorbing 2 HDFE groups                           F(   6,  30140) =   76710.08
                                                  Prob > F        =     0.0000
                                                  R-squared       =     0.9887
                                                  Adj R-squared   =     0.9886
                                                  Within R-sq.    =     0.9659
                                                  Root MSE        =     2.2499

--------------------------------------------------------------------------------
               |               Robust
stringencyin~x | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
---------------+----------------------------------------------------------------
lstringencyi~x |   .9779756   .0017953   544.74   0.000     .9744567    .9814945
  lwindexinrow |   .0227918    .005089     4.48   0.000     .0128171    .0327665
         inter |  -.0036454   .0013499    -2.70   0.007    -.0062912   -.0009995
lnew_deaths_~2 |   .0008363      .0094     0.09   0.929    -.0175882    .0192607
        inter2 |   .0190753   .0094026     2.03   0.042     .0006458    .0375048
lnew_cases_p~2 |   7.22e-06   .0000335     0.22   0.829    -.0000585    .0000729
         _cons |   .1917965   .2008878     0.95   0.340    -.2019522    .5855452
--------------------------------------------------------------------------------

Absorbed degrees of freedom:
----------------------------------------------------------+
      Absorbed FE | Categories  - Redundant  = Num. Coefs |
------------------+---------------------------------------|
 countryname_code |        38           0          38     |
       month_code |        27           1          26     |
----------------------------------------------------------+

. 
.  outreg2 est1 using table4.tex, replace keep(lstringencyindex lwindexinrow inte
> r  lnew_deaths_per_million2 inter2    lnew_cases_per_million2) alpha(0.001, 0.0
> 1, 0.05)  nocons   word label dec(3)     tex addtext(Delta, All, Country FE, YE
> S, Month FE, YES)  
table4.tex
table4.rtf
dir : seeout

.  
. reghdfe stringencyindex  lstringencyindex lwindexinrow inter  lnew_deaths_per_m
> illion2 inter2    lnew_cases_per_million2 ///
>  if l.deltawindexinrow>=0  & MV>6 ,     abs(countryname_code month_code) vce(r)
(MWFE estimator converged in 4 iterations)

HDFE Linear regression                            Number of obs   =     18,514
Absorbing 2 HDFE groups                           F(   6,  18444) =   51668.12
                                                  Prob > F        =     0.0000
                                                  R-squared       =     0.9901
                                                  Adj R-squared   =     0.9900
                                                  Within R-sq.    =     0.9671
                                                  Root MSE        =     2.3168

--------------------------------------------------------------------------------
               |               Robust
stringencyin~x | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
---------------+----------------------------------------------------------------
lstringencyi~x |   .9763988   .0023063   423.36   0.000     .9718782    .9809193
  lwindexinrow |   .0262772   .0058977     4.46   0.000     .0147171    .0378372
         inter |  -.0040399   .0016646    -2.43   0.015    -.0073027   -.0007771
lnew_deaths_~2 |  -.0026444   .0132096    -0.20   0.841    -.0285365    .0232478
        inter2 |   .0144895   .0132403     1.09   0.274    -.0114627    .0404417
lnew_cases_p~2 |   .0000793   .0000526     1.51   0.132    -.0000239    .0001824
         _cons |   .2184878   .2053792     1.06   0.287    -.1840745    .6210502
--------------------------------------------------------------------------------

Absorbed degrees of freedom:
----------------------------------------------------------+
      Absorbed FE | Categories  - Redundant  = Num. Coefs |
------------------+---------------------------------------|
 countryname_code |        38           0          38     |
       month_code |        27           1          26     |
----------------------------------------------------------+

. 
.  outreg2 est1 using table4.tex,  keep(lstringencyindex lwindexinrow inter  lnew
> _deaths_per_million2 inter2    lnew_cases_per_million2) alpha(0.001, 0.01, 0.05
> )  nocons   word label dec(3)     tex addtext(Delta, >=0, Country FE, YES, Mont
> h FE, YES)  
table4.tex
table4.rtf
dir : seeout

.  
. reghdfe stringencyindex  lstringencyindex lwindexinrow inter  lnew_deaths_per_m
> illion2 inter2    lnew_cases_per_million2 ///
>  if l.deltawindexinrow<0  & MV>6 ,     abs(countryname_code month_code) vce(r)
(MWFE estimator converged in 4 iterations)

HDFE Linear regression                            Number of obs   =     11,696
Absorbing 2 HDFE groups                           F(   6,  11629) =   26355.05
                                                  Prob > F        =     0.0000
                                                  R-squared       =     0.9832
                                                  Adj R-squared   =     0.9831
                                                  Within R-sq.    =     0.9624
                                                  Root MSE        =     2.1374

--------------------------------------------------------------------------------
               |               Robust
stringencyin~x | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
---------------+----------------------------------------------------------------
lstringencyi~x |   .9798873   .0028383   345.24   0.000     .9743238    .9854507
  lwindexinrow |   .0042373   .0114258     0.37   0.711    -.0181591    .0266337
         inter |  -.0033632   .0034206    -0.98   0.326    -.0100682    .0033418
lnew_deaths_~2 |   .0031711   .0129697     0.24   0.807    -.0222517    .0285939
        inter2 |   .0303498   .0127501     2.38   0.017     .0053576    .0553421
lnew_cases_p~2 |   -.000045   .0000436    -1.03   0.302    -.0001305    .0000405
         _cons |   .9358415    .501175     1.87   0.062    -.0465457    1.918229
--------------------------------------------------------------------------------

Absorbed degrees of freedom:
----------------------------------------------------------+
      Absorbed FE | Categories  - Redundant  = Num. Coefs |
------------------+---------------------------------------|
 countryname_code |        38           0          38     |
       month_code |        24           1          23     |
----------------------------------------------------------+

. 
.    outreg2 est1 using table4.tex,  keep(lstringencyindex lwindexinrow inter  ln
> ew_deaths_per_million2 inter2    lnew_cases_per_million2) alpha(0.001, 0.01, 0.
> 05)  nocons   word label dec(3)     tex addtext(Delta, <0, Country FE, YES, Mon
> th FE, YES)
table4.tex
table4.rtf
dir : seeout

.    
. drop inter inter2

. gen inter = lwindexinrow*hospital_beds_p1k
(38 missing values generated)

. gen inter2 = lnew_deaths_per_million2*hospital_beds_p1k
(38 missing values generated)

. 
. label variable inter "W Geography (lag) * Institutions"

. label variable inter2 "New Deaths (lag) * Institutions"

. 
. reghdfe stringencyindex  lstringencyindex lwindexinrow inter  lnew_deaths_per_m
> illion2 inter2    lnew_cases_per_million2 ///
>  if  MV>6 ,     abs(countryname_code month_code) vce(r)
(MWFE estimator converged in 2 iterations)

HDFE Linear regression                            Number of obs   =     30,210
Absorbing 2 HDFE groups                           F(   6,  30140) =   77895.28
                                                  Prob > F        =     0.0000
                                                  R-squared       =     0.9887
                                                  Adj R-squared   =     0.9886
                                                  Within R-sq.    =     0.9659
                                                  Root MSE        =     2.2494

--------------------------------------------------------------------------------
               |               Robust
stringencyin~x | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
---------------+----------------------------------------------------------------
lstringencyi~x |   .9777094   .0017965   544.22   0.000     .9741881    .9812306
  lwindexinrow |   .0247916   .0048721     5.09   0.000      .015242    .0343412
         inter |  -.0014605   .0003192    -4.58   0.000    -.0020862   -.0008348
lnew_deaths_~2 |  -.0016728   .0136932    -0.12   0.903    -.0285122    .0251665
        inter2 |   .0043621   .0023695     1.84   0.066    -.0002823    .0090065
lnew_cases_p~2 |   .0000114   .0000336     0.34   0.735    -.0000546    .0000773
         _cons |   .2155231   .2004915     1.07   0.282    -.1774488     .608495
--------------------------------------------------------------------------------

Absorbed degrees of freedom:
----------------------------------------------------------+
      Absorbed FE | Categories  - Redundant  = Num. Coefs |
------------------+---------------------------------------|
 countryname_code |        38           0          38     |
       month_code |        27           1          26     |
----------------------------------------------------------+

. 
.  outreg2 est1 using table4.tex,  keep(lstringencyindex lwindexinrow inter  lnew
> _deaths_per_million2 inter2    lnew_cases_per_million2) alpha(0.001, 0.01, 0.05
> )  nocons   word label dec(3)     tex addtext(Delta, All, Country FE, YES, Mont
> h FE, YES)  
table4.tex
table4.rtf
dir : seeout

.  
. reghdfe stringencyindex  lstringencyindex lwindexinrow inter  lnew_deaths_per_m
> illion2 inter2    lnew_cases_per_million2 ///
>  if l.deltawindexinrow>=0  & MV>6 ,     abs(countryname_code month_code) vce(r)
(MWFE estimator converged in 4 iterations)

HDFE Linear regression                            Number of obs   =     18,514
Absorbing 2 HDFE groups                           F(   6,  18444) =   52019.88
                                                  Prob > F        =     0.0000
                                                  R-squared       =     0.9901
                                                  Adj R-squared   =     0.9900
                                                  Within R-sq.    =     0.9672
                                                  Root MSE        =     2.3164

--------------------------------------------------------------------------------
               |               Robust
stringencyin~x | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
---------------+----------------------------------------------------------------
lstringencyi~x |   .9761355   .0023057   423.36   0.000     .9716161    .9806548
  lwindexinrow |   .0273639   .0055781     4.91   0.000     .0164303    .0382974
         inter |   -.001323   .0003548    -3.73   0.000    -.0020184   -.0006276
lnew_deaths_~2 |   .0004339   .0205684     0.02   0.983     -.039882    .0407498
        inter2 |   .0026319   .0034113     0.77   0.440    -.0040546    .0093184
lnew_cases_p~2 |   .0000788   .0000527     1.50   0.135    -.0000245     .000182
         _cons |   .2296384   .2050651     1.12   0.263    -.1723082     .631585
--------------------------------------------------------------------------------

Absorbed degrees of freedom:
----------------------------------------------------------+
      Absorbed FE | Categories  - Redundant  = Num. Coefs |
------------------+---------------------------------------|
 countryname_code |        38           0          38     |
       month_code |        27           1          26     |
----------------------------------------------------------+

. 
.  outreg2 est1 using table4.tex,  keep(lstringencyindex lwindexinrow inter  lnew
> _deaths_per_million2 inter2    lnew_cases_per_million2) alpha(0.001, 0.01, 0.05
> )  nocons   word label dec(3)     tex addtext(Delta, >=0, Country FE, YES, Mont
> h FE, YES)  
table4.tex
table4.rtf
dir : seeout

.  
. reghdfe stringencyindex  lstringencyindex lwindexinrow inter  lnew_deaths_per_m
> illion2 inter2    lnew_cases_per_million2 ///
>  if l.deltawindexinrow<0  & MV>6 ,     abs(countryname_code month_code) vce(r)
(MWFE estimator converged in 4 iterations)

HDFE Linear regression                            Number of obs   =     11,696
Absorbing 2 HDFE groups                           F(   6,  11629) =   26574.79
                                                  Prob > F        =     0.0000
                                                  R-squared       =     0.9832
                                                  Adj R-squared   =     0.9831
                                                  Within R-sq.    =     0.9624
                                                  Root MSE        =     2.1371

--------------------------------------------------------------------------------
               |               Robust
stringencyin~x | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
---------------+----------------------------------------------------------------
lstringencyi~x |   .9795942   .0028275   346.45   0.000     .9740517    .9851366
  lwindexinrow |   .0063837   .0102063     0.63   0.532    -.0136224    .0263897
         inter |  -.0018723   .0008767    -2.14   0.033    -.0035907   -.0001539
lnew_deaths_~2 |  -.0095224   .0158884    -0.60   0.549    -.0406663    .0216215
        inter2 |   .0083676   .0031119     2.69   0.007     .0022678    .0144675
lnew_cases_p~2 |  -.0000339   .0000435    -0.78   0.436    -.0001192    .0000513
         _cons |    1.08053   .5032366     2.15   0.032     .0941018    2.066959
--------------------------------------------------------------------------------

Absorbed degrees of freedom:
----------------------------------------------------------+
      Absorbed FE | Categories  - Redundant  = Num. Coefs |
------------------+---------------------------------------|
 countryname_code |        38           0          38     |
       month_code |        24           1          23     |
----------------------------------------------------------+

. 
.    outreg2 est1 using table4.tex,  keep(lstringencyindex lwindexinrow inter  ln
> ew_deaths_per_million2 inter2    lnew_cases_per_million2) alpha(0.001, 0.01, 0.
> 05)  nocons   word label dec(3)     tex addtext(Delta, <0, Country FE, YES, Mon
> th FE, YES)
table4.tex
table4.rtf
dir : seeout

.    
. 
. *************************
. *************************
. * Interaction IQ
. *************************
. *************************
. 
. use CDS_DMITD_replication.dta, replace

. 
. xtset countryname_code date2

Panel variable: countryname_code (strongly balanced)
 Time variable: date2, 01jan2020 to 11mar2022
         Delta: 1 day

. 
. 
. gen deltawindexinrow=windexinrow-l.windexinrow
(38 missing values generated)

. 
. reghdfe stringencyindex c.l.new_deaths_per_million2##c.gee l.stringencyindex c.
> l.windexinrow##c.gee l.new_cases_per_million2 ///
>  if l.deltawindexinrow<0  & MV>6 ,     abs(countryname_code month_code) vce(r)
(MWFE estimator converged in 4 iterations)
note: gee is probably collinear with the fixed effects (all partialled-out values
>  are close to zero; tol = 1.0e-09)
note: gee is probably collinear with the fixed effects (all partialled-out values
>  are close to zero; tol = 1.0e-09)

HDFE Linear regression                            Number of obs   =     11,696
Absorbing 2 HDFE groups                           F(   6,  11629) =   26355.05
                                                  Prob > F        =     0.0000
                                                  R-squared       =     0.9832
                                                  Adj R-squared   =     0.9831
                                                  Within R-sq.    =     0.9624
                                                  Root MSE        =     2.1374

--------------------------------------------------------------------------------
               |               Robust
stringencyin~x | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
---------------+----------------------------------------------------------------
new_deaths_p~2 |
           L1. |   .0031711   .0129697     0.24   0.807    -.0222517    .0285939
               |
           gee |          0  (omitted)
               |
           cL. |
new_deaths_p~2#|
         c.gee |   .0303498   .0127501     2.38   0.017     .0053576    .0553421
               |
stringencyin~x |
           L1. |   .9798873   .0028383   345.24   0.000     .9743238    .9854507
               |
   windexinrow |
           L1. |   .0042373   .0114258     0.37   0.711    -.0181591    .0266337
               |
           gee |          0  (omitted)
               |
           cL. |
   windexinrow#|
         c.gee |  -.0033632   .0034206    -0.98   0.326    -.0100682    .0033418
               |
new_cases_pe~2 |
           L1. |   -.000045   .0000436    -1.03   0.302    -.0001305    .0000405
               |
         _cons |   .9358415    .501175     1.87   0.062    -.0465457    1.918229
--------------------------------------------------------------------------------

Absorbed degrees of freedom:
----------------------------------------------------------+
      Absorbed FE | Categories  - Redundant  = Num. Coefs |
------------------+---------------------------------------|
 countryname_code |        38           0          38     |
       month_code |        24           1          23     |
----------------------------------------------------------+

. 
. matrix b=e(b)

. matrix V=e(V)

. matlist b

             |         L.         o. cL.n~de~2#         L.         L.         o.
             | new_dea~2        gee      c.gee  stringe~x  wind~nrow        gee 
-------------+------------------------------------------------------------------
          y1 |  .0031711          0   .0303498   .9798873   .0042373          0 

             | cL.wind..#         L.           
             |     c.gee  new_cas~2      _cons 
-------------+--------------------------------
          y1 | -.0033632   -.000045   .9358415 

. matlist V

             |         L.         o. cL.n~de~2#         L.         L.         o.
             | new_dea~2        gee      c.gee  stringe~x  wind~nrow        gee 
-------------+------------------------------------------------------------------
L.new_deat~2 |  .0001682                                                        
       o.gee |         0          0                                             
cL.new_dea~2#|                                                                  
       c.gee | -.0001407          0   .0001626                                  
L.stringen~x | -3.41e-06          0  -3.09e-06   8.06e-06                       
L.windexin~w | -.0000198          0   .0000295  -.0000127   .0001305            
       o.gee |         0          0          0          0          0          0 
cL.wind~nrow#|                                                                  
       c.gee |  7.43e-06          0  -.0000127   2.51e-06  -.0000232          0 
L.new_case~2 | -9.09e-08          0   1.99e-08   3.42e-09  -2.38e-08          0 
       _cons |  .0007656          0  -.0006849   .0001002  -.0050593          0 

             | cL.wind..#         L.           
             |     c.gee  new_cas~2      _cons 
-------------+--------------------------------
cL.wind~nrow#|                                
       c.gee |  .0000117                       
L.new_case~2 |  1.94e-08   1.90e-09            
       _cons |  .0003923  -5.92e-07   .2511764 

. scalar b1=b[1,1]

. scalar b3=b[1,3]

. scalar list b1 b3
        b1 =  .00317112
        b3 =  .03034985

. scalar varb1=V[1,1]

. scalar varb3=V[3,3]

. scalar covb1b3=V[1,3]

. scalar list b1 b3 varb1 varb3 covb1b3
        b1 =  .00317112
        b3 =  .03034985
     varb1 =  .00016821
     varb3 =  .00016256
   covb1b3 = -.00014066

. 
. sum gee if e(sample)

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
         gee |     11,696    1.170545    .5782971  -.2793775   1.999047

. generate MVZ=((_n/10)-.4)

. sum MVZ

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
         MVZ |     30,438     1521.55    878.6838        -.3     3043.4

. replace MVZ=. if MVZ>2
(30,414 real changes made, 30,414 to missing)

. sum MVZ

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
         MVZ |         24         .85    .7071068        -.3          2

. 
. gen conbx=b1+b3*MVZ if MVZ!=.
(30,414 missing values generated)

. gen consx=sqrt(varb1+varb3*(MVZ^2)+2*covb1b3*MVZ) if MVZ!=.
(30,414 missing values generated)

. gen ax=1.96*consx
(30,414 missing values generated)

. gen upperx=conbx+ax
(30,414 missing values generated)

. gen lowerx=conbx-ax
(30,414 missing values generated)

. 
. gen yline=0

. 
. graph twoway hist gee, width(0.1) percent color(gs14) yaxis(2) ///
> || line conbx MVZ, clpattern(solid) clwidth(medium) clcolor(black) yaxis(1) ///
> || line upperx MVZ, clpattern(dash) clwidth(thin) clcolor(black) ///
> || line lowerx MVZ, clpattern(dash) clwidth(thin) clcolor(black) ///
> || line yline MVZ, clwidth(thin) clcolor(black) clpattern(solid) ///
> || , ///
> xlabel(-.3 (.1) 2, nogrid labsize(2)) ///
> ylabel(-.06 (.02) .1, axis(1) nogrid labsize(2)) ///
> ylabel(, axis(2) nogrid labsize(2)) ///
> yscale(noline alt) ///
> yscale(noline alt axis(2)) ///
> xscale(noline) ///
> legend(off) ///
> xtitle("Institutional Quality" , size(2.5) ) ///
> ytitle("Marginal Effect of Lagged Deaths" , axis(1) size(2.5)) ///
> ytitle("Percentage of Observations" , axis(2) size(2.5)) ///
> xsca(titlegap(2)) ///
> ysca(titlegap(2)) ///
> scheme(s2mono) graphregion(fcolor(white) ilcolor(white) lcolor(white)) note("Mo
> del: only with {&Delta}<0")  saving(a.gph, replace)
file a.gph saved

.  
.  
. graph export "Figure2Right.eps", as(eps) name("Graph") preview(off) replace
file Figure2Right.eps saved as EPS format

. 
. graph export "Figure2Rightpdf.pdf", as(pdf) name("Graph") replace
file
    /Users/stanig/Library/CloudStorage/Dropbox/LockDownPolicyDiffusion/Replicat
    > ionMaterials/ToPost/Figure2Rightpdf.pdf saved as PDF format

.  
.  
. reghdfe stringencyindex c.l.windexinrow##c.gee l.stringencyindex  l.new_cases_p
> er_million2 ///
>  c.l.new_deaths_per_million2##c.gee if l.deltawindexinrow>=0  & MV>6,     abs(c
> ountryname_code month_code) vce(r)
(MWFE estimator converged in 4 iterations)
note: gee is probably collinear with the fixed effects (all partialled-out values
>  are close to zero; tol = 1.0e-09)
note: gee is probably collinear with the fixed effects (all partialled-out values
>  are close to zero; tol = 1.0e-09)

HDFE Linear regression                            Number of obs   =     18,514
Absorbing 2 HDFE groups                           F(   6,  18444) =   51668.12
                                                  Prob > F        =     0.0000
                                                  R-squared       =     0.9901
                                                  Adj R-squared   =     0.9900
                                                  Within R-sq.    =     0.9671
                                                  Root MSE        =     2.3168

--------------------------------------------------------------------------------
               |               Robust
stringencyin~x | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
---------------+----------------------------------------------------------------
   windexinrow |
           L1. |   .0262772   .0058977     4.46   0.000     .0147171    .0378372
               |
           gee |          0  (omitted)
               |
           cL. |
   windexinrow#|
         c.gee |  -.0040399   .0016646    -2.43   0.015    -.0073027   -.0007771
               |
stringencyin~x |
           L1. |   .9763988   .0023063   423.36   0.000     .9718782    .9809193
               |
new_cases_pe~2 |
           L1. |   .0000793   .0000526     1.51   0.132    -.0000239    .0001824
               |
new_deaths_p~2 |
           L1. |  -.0026444   .0132096    -0.20   0.841    -.0285365    .0232478
               |
           gee |          0  (omitted)
               |
           cL. |
new_deaths_p~2#|
         c.gee |   .0144895   .0132403     1.09   0.274    -.0114627    .0404417
               |
         _cons |   .2184878   .2053792     1.06   0.287    -.1840745    .6210502
--------------------------------------------------------------------------------

Absorbed degrees of freedom:
----------------------------------------------------------+
      Absorbed FE | Categories  - Redundant  = Num. Coefs |
------------------+---------------------------------------|
 countryname_code |        38           0          38     |
       month_code |        27           1          26     |
----------------------------------------------------------+

.  
. matrix b=e(b)

. matrix V=e(V)

. matlist b

             |         L.         o. cL.wind..#         L.         L.         L.
             | wind~nrow        gee      c.gee  stringe~x  new_cas~2  new_dea~2 
-------------+------------------------------------------------------------------
          y1 |  .0262772          0  -.0040399   .9763988   .0000793  -.0026444 

             |         o. cL.n~de~2#           
             |       gee      c.gee      _cons 
-------------+--------------------------------
          y1 |         0   .0144895   .2184878 

. matlist V

             |         L.         o. cL.wind..#         L.         L.         L.
             | wind~nrow        gee      c.gee  stringe~x  new_cas~2  new_dea~2 
-------------+------------------------------------------------------------------
L.windexin~w |  .0000348                                                        
       o.gee |         0          0                                             
cL.wind~nrow#|                                                                  
       c.gee | -5.51e-06          0   2.77e-06                                  
L.stringen~x | -7.79e-06          0   1.01e-06   5.32e-06                       
L.new_case~2 |  9.08e-09          0  -6.70e-09  -8.83e-09   2.77e-09            
L.new_deat~2 |   -.00003          0   .0000142   1.63e-06  -1.34e-07   .0001745 
       o.gee |         0          0          0          0          0          0 
cL.new_dea~2#|                                                                  
       c.gee |    .00003          0  -.0000147  -5.98e-06   2.19e-08  -.0001422 
       _cons | -.0009967          0   .0000636    .000062  -1.06e-07   .0005391 

             |         o. cL.n~de~2#           
             |       gee      c.gee      _cons 
-------------+--------------------------------
       o.gee |         0                       
cL.new_dea~2#|                                
       c.gee |         0   .0001753            
       _cons |         0  -.0003993   .0421806 

. scalar b1=b[1,1]

. scalar b3=b[1,3]

. scalar list b1 b3
        b1 =  .02627716
        b3 = -.00403988

. scalar varb1=V[1,1]

. scalar varb3=V[3,3]

. scalar covb1b3=V[1,3]

. scalar list b1 b3 varb1 varb3 covb1b3
        b1 =  .02627716
        b3 = -.00403988
     varb1 =  .00003478
     varb3 =  2.771e-06
   covb1b3 = -5.512e-06

. 
. cap drop conbx consx ax upperx lowerx 

. 
. gen conbx=b1+b3*MVZ if MVZ!=.
(30,414 missing values generated)

. gen consx=sqrt(varb1+varb3*(MVZ^2)+2*covb1b3*MVZ) if MVZ!=.
(30,414 missing values generated)

. gen ax=1.96*consx
(30,414 missing values generated)

. gen upperx=conbx+ax
(30,414 missing values generated)

. gen lowerx=conbx-ax
(30,414 missing values generated)

. 
. graph twoway hist gee, width(0.1) percent color(gs14) yaxis(2) ////
> || line conbx MVZ, clpattern(solid) clwidth(medium) clcolor(black) yaxis(1) ///
> || line upperx MVZ, clpattern(dash) clwidth(thin) clcolor(black) ///
> || line lowerx MVZ, clpattern(dash) clwidth(thin) clcolor(black)  , ///
> xlabel(-.3 (.1) 2, nogrid labsize(2)) ///
> ylabel(.01 (.01) .04, axis(1) nogrid labsize(2)) ///
> ylabel(, axis(2) nogrid labsize(2)) ///
> yscale(range(.01 .04) axis(1)) ///
> yscale(noline alt) ///
> yscale(noline alt axis(2)) ///
> xscale(noline) ///
> legend(off) ///
> xtitle("Institutional Quality" , size(2.5) ) ///
> ytitle("Marginal Effect of W - Geographical Proximity" , axis(1) size(2.5)) ///
> ytitle("Percentage of Observations" , axis(2) size(2.5)) ///
> xsca(titlegap(2)) ///
> ysca(titlegap(2)) ///
> scheme(s2mono) graphregion(fcolor(white) ilcolor(white) lcolor(white)) note("Mo
> del: only with {&Delta}>=0") saving(b.gph, replace)
file b.gph saved

. 
. 
. **** Create Figure 2
. 
. gr combine b.gph a.gph, scheme(s2mono) graphregion(fcolor(white) ilcolor(white)
>  lcolor(white))

. 
. 
. 
. graph export "Figure2.eps", as(eps) name("Graph") preview(off) replace
file Figure2.eps saved as EPS format

. 
. graph export "Figure2pdf.pdf", as(pdf) name("Graph") replace
file
    /Users/stanig/Library/CloudStorage/Dropbox/LockDownPolicyDiffusion/Replicat
    > ionMaterials/ToPost/Figure2pdf.pdf saved as PDF format

.  
. *************************
. *************************
. * Interaction hospital
. *************************
. *************************
. 
. use CDS_DMITD_replication.dta, replace

. 
. xtset countryname_code date2

Panel variable: countryname_code (strongly balanced)
 Time variable: date2, 01jan2020 to 11mar2022
         Delta: 1 day

. 
. 
. gen deltawindexinrow=windexinrow-l.windexinrow
(38 missing values generated)

. 
. cap drop _merge

. 
. merge m:1 iso_code using "merged_healthcare_dataset.dta"

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                            30,438  (_merge==3)
    -----------------------------------------

. 
. 
. xtset countryname_code date2

Panel variable: countryname_code (strongly balanced)
 Time variable: date2, 01jan2020 to 11mar2022
         Delta: 1 day

. 
. 
. reghdfe stringencyindex  c.l.new_deaths_per_million2##c.hospital_beds_p1k l.str
> ingencyindex  l.new_cases_per_million2 ///
>  c.l.windexinrow##c.hospital_beds_p1k if l.deltawindexinrow<0  & MV>6,     abs(
> countryname_code month_code) vce(r)
(MWFE estimator converged in 4 iterations)
note: hospital_beds_p1k is probably collinear with the fixed effects (all partial
> led-out values are close to zero; tol = 1.0e-09)
note: hospital_beds_p1k is probably collinear with the fixed effects (all partial
> led-out values are close to zero; tol = 1.0e-09)

HDFE Linear regression                            Number of obs   =     11,696
Absorbing 2 HDFE groups                           F(   6,  11629) =   26574.79
                                                  Prob > F        =     0.0000
                                                  R-squared       =     0.9832
                                                  Adj R-squared   =     0.9831
                                                  Within R-sq.    =     0.9624
                                                  Root MSE        =     2.1371

--------------------------------------------------------------------------------
               |               Robust
stringencyin~x | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
---------------+----------------------------------------------------------------
new_deaths_p~2 |
           L1. |  -.0095224   .0158884    -0.60   0.549    -.0406663    .0216215
               |
hospital_be~1k |          0  (omitted)
               |
           cL. |
new_deaths_p~2#|
            c. |
hospital_be~1k |   .0083676   .0031119     2.69   0.007     .0022678    .0144675
               |
stringencyin~x |
           L1. |   .9795942   .0028275   346.45   0.000     .9740517    .9851366
               |
new_cases_pe~2 |
           L1. |  -.0000339   .0000435    -0.78   0.436    -.0001192    .0000513
               |
   windexinrow |
           L1. |   .0063837   .0102063     0.63   0.532    -.0136224    .0263897
               |
hospital_be~1k |          0  (omitted)
               |
           cL. |
   windexinrow#|
            c. |
hospital_be~1k |  -.0018723   .0008767    -2.14   0.033    -.0035907   -.0001539
               |
         _cons |    1.08053   .5032367     2.15   0.032     .0941019    2.066959
--------------------------------------------------------------------------------

Absorbed degrees of freedom:
----------------------------------------------------------+
      Absorbed FE | Categories  - Redundant  = Num. Coefs |
------------------+---------------------------------------|
 countryname_code |        38           0          38     |
       month_code |        24           1          23     |
----------------------------------------------------------+

. 
. matrix b=e(b)

. matrix V=e(V)

. matlist b

             |         L.         o. cL.n~de~2#         L.         L.         L.
             | new_dea~2  hospit~1k  c.hosp~1k  stringe~x  new_cas~2  wind~nrow 
-------------+------------------------------------------------------------------
          y1 | -.0095224          0   .0083676   .9795942  -.0000339   .0063837 

             |         o. cL.wind..#           
             | hospit~1k  c.hosp~1k      _cons 
-------------+--------------------------------
          y1 |         0  -.0018723    1.08053 

. matlist V

             |         L.         o. cL.n~de~2#         L.         L.         L.
             | new_dea~2  hospit~1k  c.hosp~1k  stringe~x  new_cas~2  wind~nrow 
-------------+------------------------------------------------------------------
L.new_deat~2 |  .0002524                                                        
o.hospita~1k |         0          0                                             
cL.new_dea~2#|                                                                  
c.hospita~1k | -.0000447          0   9.68e-06                                  
L.stringen~x |  8.55e-07          0  -1.44e-06   8.00e-06                       
L.new_case~2 | -1.11e-07          0   8.77e-09  -2.80e-10   1.89e-09            
L.windexin~w |  2.21e-06          0   2.10e-07    -.00001   3.91e-09   .0001042 
o.hospita~1k |         0          0          0          0          0          0 
cL.wind~nrow#|                                                                  
c.hospita~1k |  2.57e-06          0  -6.58e-07   2.46e-07   1.19e-09  -3.13e-06 
       _cons | -.0008948          0   .0002315    .000057  -9.46e-07  -.0044911 

             |         o. cL.wind..#           
             | hospit~1k  c.hosp~1k      _cons 
-------------+--------------------------------
o.hospita~1k |         0                       
cL.wind~nrow#|                                
c.hospita~1k |         0   7.69e-07            
       _cons |         0  -.0000235   .2532471 

. scalar b1=b[1,1]

. scalar b3=b[1,3]

. scalar list b1 b3
        b1 = -.00952241
        b3 =  .00836764

. scalar varb1=V[1,1]

. scalar varb3=V[3,3]

. scalar covb1b3=V[1,3]

. scalar list b1 b3 varb1 varb3 covb1b3
        b1 = -.00952241
        b3 =  .00836764
     varb1 =  .00025244
     varb3 =  9.684e-06
   covb1b3 = -.00004468

. 
. sum hospital_beds_p1k if e(sample)

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
hospital_~1k |     11,696    4.382119     2.60822        .95       12.8

. generate MVZ=((_n/1))

. sum MVZ

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
         MVZ |     30,438     15219.5    8786.838          1      30438

. replace MVZ=. if MVZ>13
(30,425 real changes made, 30,425 to missing)

. sum MVZ

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
         MVZ |         13           7     3.89444          1         13

. 
. gen conbx=b1+b3*MVZ if MVZ!=.
(30,425 missing values generated)

. gen consx=sqrt(varb1+varb3*(MVZ^2)+2*covb1b3*MVZ) if MVZ!=.
(30,425 missing values generated)

. gen ax=1.96*consx
(30,425 missing values generated)

. gen upperx=conbx+ax
(30,425 missing values generated)

. gen lowerx=conbx-ax
(30,425 missing values generated)

. 
. gen yline=0

. 
. codebook hospital_beds_p1k

---------------------------------------------------------------------------------
hospital_beds_p1k              Hospital beds (per 1 000 inhabitants; latest year)
---------------------------------------------------------------------------------

                  Type: Numeric (float)

                 Range: [.95,12.8]                    Units: .01
         Unique values: 37                        Missing .: 0/30,438

                  Mean: 4.38211
             Std. dev.: 2.58942

           Percentiles:     10%       25%       50%       75%       90%
                           2.03       2.8     3.485      5.76      7.19

. 
. graph twoway hist hospital_beds_p1k, width(0.3) percent color(gs14) yaxis(2) //
> /
> || line conbx MVZ, clpattern(solid) clwidth(medium) clcolor(black) yaxis(1) ///
> || line upperx MVZ, clpattern(dash) clwidth(thin) clcolor(black) ///
> || line lowerx MVZ, clpattern(dash) clwidth(thin) clcolor(black) ///
> || line yline MVZ, clwidth(thin) clcolor(black) clpattern(solid) ///
> || , ///
> xlabel(1 (1) 13, nogrid labsize(2)) ///
> ylabel(-0.06 (0.02) 0.2, axis(1) nogrid labsize(2)) ///
> ylabel(, axis(2) nogrid labsize(2)) ///
> yscale(noline alt) ///
> yscale(noline alt axis(2)) ///
> xscale(noline) ///
> legend(off) ///
> xtitle("Hospital beds (per 1 000 inhabitants)" , size(2.5) ) ///
> ytitle("Marginal Effect of Lagged Deaths" , axis(1) size(2.5)) ///
> ytitle("Percentage of Observations" , axis(2) size(2.5)) ///
> xsca(titlegap(2)) ///
> ysca(titlegap(2)) ///
> scheme(s2mono) graphregion(fcolor(white) ilcolor(white) lcolor(white)) note("Mo
> del: only with {&Delta}<0")  saving(a.gph, replace)
file a.gph saved

. 
. graph export "Figure3BL.eps", as(eps) name("Graph") preview(off) replace
file Figure3BL.eps saved as EPS format

. 
. graph export "Figure3BLpdf.pdf", as(pdf) name("Graph") replace
file
    /Users/stanig/Library/CloudStorage/Dropbox/LockDownPolicyDiffusion/Replicat
    > ionMaterials/ToPost/Figure3BLpdf.pdf saved as PDF format

. 
. reghdfe stringencyindex c.l.windexinrow##c.hospital_beds_p1k l.stringencyindex 
>  l.new_cases_per_million2 ///
>  c.l.new_deaths_per_million2##c.hospital_beds_p1k if l.deltawindexinrow>=0  & M
> V>6,     abs(countryname_code month_code) vce(r)
(MWFE estimator converged in 4 iterations)
note: hospital_beds_p1k is probably collinear with the fixed effects (all partial
> led-out values are close to zero; tol = 1.0e-09)
note: hospital_beds_p1k is probably collinear with the fixed effects (all partial
> led-out values are close to zero; tol = 1.0e-09)

HDFE Linear regression                            Number of obs   =     18,514
Absorbing 2 HDFE groups                           F(   6,  18444) =   52019.88
                                                  Prob > F        =     0.0000
                                                  R-squared       =     0.9901
                                                  Adj R-squared   =     0.9900
                                                  Within R-sq.    =     0.9672
                                                  Root MSE        =     2.3164

--------------------------------------------------------------------------------
               |               Robust
stringencyin~x | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
---------------+----------------------------------------------------------------
   windexinrow |
           L1. |   .0273639   .0055781     4.91   0.000     .0164303    .0382974
               |
hospital_be~1k |          0  (omitted)
               |
           cL. |
   windexinrow#|
            c. |
hospital_be~1k |   -.001323   .0003548    -3.73   0.000    -.0020184   -.0006276
               |
stringencyin~x |
           L1. |   .9761355   .0023057   423.36   0.000     .9716161    .9806548
               |
new_cases_pe~2 |
           L1. |   .0000788   .0000527     1.50   0.135    -.0000245     .000182
               |
new_deaths_p~2 |
           L1. |   .0004339   .0205684     0.02   0.983     -.039882    .0407498
               |
hospital_be~1k |          0  (omitted)
               |
           cL. |
new_deaths_p~2#|
            c. |
hospital_be~1k |   .0026319   .0034113     0.77   0.440    -.0040546    .0093184
               |
         _cons |   .2296384   .2050651     1.12   0.263    -.1723082     .631585
--------------------------------------------------------------------------------

Absorbed degrees of freedom:
----------------------------------------------------------+
      Absorbed FE | Categories  - Redundant  = Num. Coefs |
------------------+---------------------------------------|
 countryname_code |        38           0          38     |
       month_code |        27           1          26     |
----------------------------------------------------------+

. 
. matrix b=e(b)

. matrix V=e(V)

. matlist b

             |         L.         o. cL.wind..#         L.         L.         L.
             | wind~nrow  hospit~1k  c.hosp~1k  stringe~x  new_cas~2  new_dea~2 
-------------+------------------------------------------------------------------
          y1 |  .0273639          0   -.001323   .9761355   .0000788   .0004339 

             |         o. cL.n~de~2#           
             | hospit~1k  c.hosp~1k      _cons 
-------------+--------------------------------
          y1 |         0   .0026319   .2296384 

. matlist V

             |         L.         o. cL.wind..#         L.         L.         L.
             | wind~nrow  hospit~1k  c.hosp~1k  stringe~x  new_cas~2  new_dea~2 
-------------+------------------------------------------------------------------
L.windexin~w |  .0000311                                                        
o.hospita~1k |         0          0                                             
cL.wind~nrow#|                                                                  
c.hospita~1k | -9.10e-07          0   1.26e-07                                  
L.stringen~x | -7.37e-06          0   1.87e-07   5.32e-06                       
L.new_case~2 |  5.73e-11          0   5.77e-10  -8.66e-09   2.77e-09            
L.new_deat~2 | -.0000239          0   2.88e-06  -1.48e-06  -1.31e-07   .0004231 
o.hospita~1k |         0          0          0          0          0          0 
cL.new_dea~2#|                                                                  
c.hospita~1k |  4.74e-06          0  -5.83e-07  -6.10e-07   3.78e-09  -.0000653 
       _cons | -.0009463          0   6.66e-06    .000059  -1.76e-07   .0003746 

             |         o. cL.n~de~2#           
             | hospit~1k  c.hosp~1k      _cons 
-------------+--------------------------------
o.hospita~1k |         0                       
cL.new_dea~2#|                                
c.hospita~1k |         0   .0000116            
       _cons |         0  -.0000465   .0420517 

. scalar b1=b[1,1]

. scalar b3=b[1,3]

. scalar list b1 b3
        b1 =  .02736385
        b3 = -.00132298

. scalar varb1=V[1,1]

. scalar varb3=V[3,3]

. scalar covb1b3=V[1,3]

. scalar list b1 b3 varb1 varb3 covb1b3
        b1 =  .02736385
        b3 = -.00132298
     varb1 =  .00003111
     varb3 =  1.259e-07
   covb1b3 = -9.096e-07

. 
. drop conbx consx ax upperx lowerx 

. 
. gen conbx=b1+b3*MVZ if MVZ!=.
(30,425 missing values generated)

. gen consx=sqrt(varb1+varb3*(MVZ^2)+2*covb1b3*MVZ) if MVZ!=.
(30,425 missing values generated)

. gen ax=1.96*consx
(30,425 missing values generated)

. gen upperx=conbx+ax
(30,425 missing values generated)

. gen lowerx=conbx-ax
(30,425 missing values generated)

. 
. graph twoway hist hospital_beds_p1k, width(0.3) percent color(gs14) yaxis(2) //
> //
> || line conbx MVZ, clpattern(solid) clwidth(medium) clcolor(black) yaxis(1) ///
> || line upperx MVZ, clpattern(dash) clwidth(thin) clcolor(black) ///
> || line lowerx MVZ, clpattern(dash) clwidth(thin) clcolor(black) ///
> || line yline MVZ, clwidth(thin) clcolor(black) clpattern(solid) ///
> || , ///
> xlabel(1 (1) 13, nogrid labsize(2)) ///
> ylabel(-0.01 0 .01 .02 0.03 0.04, axis(1) nogrid labsize(2)) ///
> ylabel(, axis(2) nogrid labsize(2)) ///
> yscale(noline alt) ///
> yscale(noline alt axis(2)) ///
> xscale(noline) ///
> legend(off) ///
> xtitle("Hospital beds (per 1 000 inhabitants)" , size(2.5) ) ///
> ytitle("Marginal Effect of W - Geographical Proximity" , axis(1) size(2.5)) ///
> ytitle("Percentage of Observations" , axis(2) size(2.5)) ///
> xsca(titlegap(2)) ///
> ysca(titlegap(2)) ///
> scheme(s2mono) graphregion(fcolor(white) ilcolor(white) lcolor(white)) note("Mo
> del: only with {&Delta} >=0") saving(b.gph, replace)
file b.gph saved

.  
. graph export "Figure3TL.eps", as(eps) name("Graph") preview(off) replace
file Figure3TL.eps saved as EPS format

. 
. graph export "Figure3TL.pdf", as(pdf) name("Graph") replace 
file
    /Users/stanig/Library/CloudStorage/Dropbox/LockDownPolicyDiffusion/Replicat
    > ionMaterials/ToPost/Figure3TL.pdf saved as PDF format

.  
. reghdfe stringencyindex c.l.windexinrow##c.hospital_beds_p1k l.stringencyindex 
>  l.new_cases_per_million2 ///
>  c.l.new_deaths_per_million2##c.hospital_beds_p1k if l.deltawindexinrow<0  & MV
> >6,     abs(countryname_code month_code) vce(r)
(MWFE estimator converged in 4 iterations)
note: hospital_beds_p1k is probably collinear with the fixed effects (all partial
> led-out values are close to zero; tol = 1.0e-09)
note: hospital_beds_p1k is probably collinear with the fixed effects (all partial
> led-out values are close to zero; tol = 1.0e-09)

HDFE Linear regression                            Number of obs   =     11,696
Absorbing 2 HDFE groups                           F(   6,  11629) =   26574.79
                                                  Prob > F        =     0.0000
                                                  R-squared       =     0.9832
                                                  Adj R-squared   =     0.9831
                                                  Within R-sq.    =     0.9624
                                                  Root MSE        =     2.1371

--------------------------------------------------------------------------------
               |               Robust
stringencyin~x | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
---------------+----------------------------------------------------------------
   windexinrow |
           L1. |   .0063837   .0102063     0.63   0.532    -.0136224    .0263897
               |
hospital_be~1k |          0  (omitted)
               |
           cL. |
   windexinrow#|
            c. |
hospital_be~1k |  -.0018723   .0008767    -2.14   0.033    -.0035907   -.0001539
               |
stringencyin~x |
           L1. |   .9795942   .0028275   346.45   0.000     .9740517    .9851366
               |
new_cases_pe~2 |
           L1. |  -.0000339   .0000435    -0.78   0.436    -.0001192    .0000513
               |
new_deaths_p~2 |
           L1. |  -.0095224   .0158884    -0.60   0.549    -.0406663    .0216215
               |
hospital_be~1k |          0  (omitted)
               |
           cL. |
new_deaths_p~2#|
            c. |
hospital_be~1k |   .0083676   .0031119     2.69   0.007     .0022678    .0144675
               |
         _cons |    1.08053   .5032367     2.15   0.032     .0941019    2.066959
--------------------------------------------------------------------------------

Absorbed degrees of freedom:
----------------------------------------------------------+
      Absorbed FE | Categories  - Redundant  = Num. Coefs |
------------------+---------------------------------------|
 countryname_code |        38           0          38     |
       month_code |        24           1          23     |
----------------------------------------------------------+

. 
. matrix b=e(b)

. matrix V=e(V)

. matlist b

             |         L.         o. cL.wind..#         L.         L.         L.
             | wind~nrow  hospit~1k  c.hosp~1k  stringe~x  new_cas~2  new_dea~2 
-------------+------------------------------------------------------------------
          y1 |  .0063837          0  -.0018723   .9795942  -.0000339  -.0095224 

             |         o. cL.n~de~2#           
             | hospit~1k  c.hosp~1k      _cons 
-------------+--------------------------------
          y1 |         0   .0083676    1.08053 

. matlist V

             |         L.         o. cL.wind..#         L.         L.         L.
             | wind~nrow  hospit~1k  c.hosp~1k  stringe~x  new_cas~2  new_dea~2 
-------------+------------------------------------------------------------------
L.windexin~w |  .0001042                                                        
o.hospita~1k |         0          0                                             
cL.wind~nrow#|                                                                  
c.hospita~1k | -3.13e-06          0   7.69e-07                                  
L.stringen~x |   -.00001          0   2.46e-07   8.00e-06                       
L.new_case~2 |  3.91e-09          0   1.19e-09  -2.80e-10   1.89e-09            
L.new_deat~2 |  2.21e-06          0   2.57e-06   8.55e-07  -1.11e-07   .0002524 
o.hospita~1k |         0          0          0          0          0          0 
cL.new_dea~2#|                                                                  
c.hospita~1k |  2.10e-07          0  -6.58e-07  -1.44e-06   8.77e-09  -.0000447 
       _cons | -.0044911          0  -.0000235    .000057  -9.46e-07  -.0008948 

             |         o. cL.n~de~2#           
             | hospit~1k  c.hosp~1k      _cons 
-------------+--------------------------------
o.hospita~1k |         0                       
cL.new_dea~2#|                                
c.hospita~1k |         0   9.68e-06            
       _cons |         0   .0002315   .2532471 

. scalar b1=b[1,1]

. scalar b3=b[1,3]

. scalar list b1 b3
        b1 =  .00638367
        b3 = -.00187232

. scalar varb1=V[1,1]

. scalar varb3=V[3,3]

. scalar covb1b3=V[1,3]

. scalar list b1 b3 varb1 varb3 covb1b3
        b1 =  .00638367
        b3 = -.00187232
     varb1 =  .00010417
     varb3 =  7.685e-07
   covb1b3 = -3.133e-06

. 
. drop conbx consx ax upperx lowerx 

. 
. gen conbx=b1+b3*MVZ if MVZ!=.
(30,425 missing values generated)

. gen consx=sqrt(varb1+varb3*(MVZ^2)+2*covb1b3*MVZ) if MVZ!=.
(30,425 missing values generated)

. gen ax=1.96*consx
(30,425 missing values generated)

. gen upperx=conbx+ax
(30,425 missing values generated)

. gen lowerx=conbx-ax
(30,425 missing values generated)

. 
. graph twoway hist hospital_beds_p1k, width(0.3) percent color(gs14) yaxis(2) //
> //
> || line conbx MVZ, clpattern(solid) clwidth(medium) clcolor(black) yaxis(1) ///
> || line upperx MVZ, clpattern(dash) clwidth(thin) clcolor(black) ///
> || line lowerx MVZ, clpattern(dash) clwidth(thin) clcolor(black) ///
> || line yline MVZ, clwidth(thin) clcolor(black) clpattern(solid) ///
> || , ///
> xlabel(1 (1) 13, nogrid labsize(2)) ///
> ylabel(-0.04 (0.01) 0.04, axis(1) nogrid labsize(2)) ///
> ylabel(, axis(2) nogrid labsize(2)) ///
> yscale(noline alt) ///
> yscale(noline alt axis(2)) ///
> xscale(noline) ///
> legend(off) ///
> xtitle("Hospital beds (per 1 000 inhabitants)" , size(2.5) ) ///
> ytitle("Marginal Effect of W - Geographical Proximity" , axis(1) size(2.5)) ///
> ytitle("Percentage of Observations" , axis(2) size(2.5)) ///
> xsca(titlegap(2)) ///
> ysca(titlegap(2)) ///
> scheme(s2mono) graphregion(fcolor(white) ilcolor(white) lcolor(white)) note("Mo
> del: only with delta<0")  saving(c.gph, replace)
file c.gph saved

.  
. graph export "Figure3TR.eps", as(eps) name("Graph") preview(off) replace
file Figure3TR.eps saved as EPS format

. 
. graph export "Figure3TR.pdf", as(pdf) name("Graph") replace 
file
    /Users/stanig/Library/CloudStorage/Dropbox/LockDownPolicyDiffusion/Replicat
    > ionMaterials/ToPost/Figure3TR.pdf saved as PDF format

.  
. gr combine b.gph c.gph a.gph, scheme(s2mono) graphregion(fcolor(white) ilcolor(
> white) lcolor(white))

. 
. 
. 
. 
. 
end of do-file

. log close
      name:  <unnamed>
       log:  /Users/stanig/Library/CloudStorage/Dropbox/LockDownPolicyDiffusion/R
> eplicationMaterials/ToPost/LogMainAnalysis.log
  log type:  text
 closed on:  14 Aug 2025, 11:58:35
---------------------------------------------------------------------------------
